﻿function chkForm(obj)//搜索框判断函数
{
	if(obj.q.value == "" || obj.q.value == "请输入关键词")
	{
		alert("请输入关键词搜索！");
		obj.q.focus();
		return false;
	}
}


function swf(src, w, h) //运行swf函数
{
	html = '';
	html += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" WIDTH="'+w+'" HEIGHT="'+h+'">';
	html += '<PARAM NAME=movie VALUE="'+src+'">';
	html += '<PARAM NAME=quality VALUE=high>';
	html += '<PARAM NAME="wmode" value="transparent" />';
	html += '<EMBED src="'+src+'" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent"  WIDTH="'+w+'"  HEIGHT="'+h+'" ></EMBED>';
	html += '</OBJECT>';
	document.write(html);
}

function clearText(field)//搜索框聚焦
{
    if (field.defaultValue == field.value) field.value = '';
    else if (field.value == '') field.value = field.defaultValue;
}

function disableselect(e){
return false}
function reEnable(){return true
}
file://if IE4+
document.onselectstart=new Function ("return false")
file://if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}

if (window.Event) 
document.captureEvents(Event.MOUSEUP); 
function nocontextmenu() {
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e) {
if (window.Event){
   if (e.which == 2 || e.which == 3)
   return false;
}else{
   if (event.button == 2 || event.button == 3){
       event.cancelBubble = true
    event.returnValue = false;
       return false;
    }
}
}

document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others

//-->
