// JavaScript Document
function innerFlash(flashurl,fwidth,fheight,falpha){
	var flashstr = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+fwidth+"' height='"+fheight+"' align='middle'>";
	flashstr += "<param name='allowScriptAccess' value='sameDomain' />";
	flashstr += falpha?"<param name='WMode' value='Transparent' />":"";
	flashstr += "<param name='movie' value='"+flashurl+"' />";
	flashstr += "<param name='quality' value='Medium' />";
	flashstr += "<param name='bgcolor' value='#ffffff' />";
	flashstr += "<embed src='"+flashurl+"' quality='high' bgcolor='#cccccc' width='"+fwidth+"' height='"+fheight+"' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' "+(falpha?"wmode='transparent'":"")+" pluginspage='http://www.macromedia.com/go/getflashplayer'/>";
	flashstr += "</object>";
	document.write(flashstr);
}
function Browser() {  
	this.IsIE = function() {    
		try {      
			return this.Test(document.all && !document.contains)!=false;    }
		catch(e) {      // for check IE 5.01     
			if (document.all) 
				return true;      
			return false;    
		}  
	}
	this.Test = function(test) {    
		if (test==undefined) {      
			return false;    
		} else {      
			return test;    
		}  
	}
}
var brs = new Browser();
try{    
	if (!brs.IsIE() && netscape.security.PrivilegeManager.enablePrivilege) {
		netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');    
	}
}catch (e){
//	alert(e);  
}

function createxmlhttpRequest(){
	/*
	var xmlhttp
	if(window.ActiveXObject) {
		xmlhttp = new ActiveXObject("Microsoft.xmlhttp");
	}
	else if (window.XMLHttpRequest) {
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp
	*/
	  var xmlhttp
	  try {
	    xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
	   } catch (e) {
	     try {
	        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	     } catch (E) {
	        xmlhttp=false;
	     }
	  }
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	        try {
	                xmlhttp = new XMLHttpRequest();
	        } catch (e) {
	                xmlhttp=false;
	        }
	}
	if (!xmlhttp && window.createRequest) {
	        try {
	                xmlhttp = window.createRequest();
	        } catch (e) {
	                xmlhttp=false;
	        }
	}
	return xmlhttp;
}

function key(){ 
	
	if(event.altKey){
		return false;
	}
	/*
	if(event.ctrlKey){
		return false
	}
	*/
	return true;
}

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){
			alert("本网站全部图文系属Fun学网所有，未经授权不得任意转载。\r\nCopyright of content and graphics on this site belongs to FunShare Portal. Reuse of any content and graphics without permission is strictly prohibited.")
			return false;
		}
	}
	else if (event.button == 2 || event.button == 3){
		alert("本网站全部图文系属Fun学网所有，未经授权不得任意转载。\r\nCopyright of content and graphics on this site belongs to FunShare Portal. Reuse of any content and graphics without permission is strictly prohibited.")
		event.cancelBubble = true
		event.returnValue = false;
		return false;
	}
}
//document.oncontextmenu = nocontextmenu;  // for IE5+
//document.onmousedown = norightclick;  // for all others

function noselect(e){
	if(window.Event){
		if(Event.target.type=="text" ||  Event.target.type=="password" ||  Event.target.type=="textarea") 
		  return true
	}else{
		if(event.srcElement.type=="text" || event.srcElement.type=="password" || event.srcElement.type=="textarea") 
		  return true
	}
	return false;
}
function nopaste(){
	return false;
}
//document.onkeydown=key;
//document.onselectstart = noselect;
//document.onpaste = nopaste;
