	var menu_timeout;

	function E_menu_over(getsubsection,getactivemenu,getcountmenu){
		clearTimeout(menu_timeout);
		submenu=getsubsection;
		i=1;
		document.getElementById(getactivemenu).style.visibility='visible';
		//alert(document.getElementById(getactivemenu).style.visibility);
		while(i<=getcountmenu){
			//alert(submenu+""+i);
			if(submenu+""+i != getactivemenu){
				document.getElementById(submenu+""+i).style.visibility='hidden';
			}
			i++;
		}
	}

	function E_menu_out(getactiveid){
		clearTimeout(menu_timeout);
		menu_timeout=setTimeout("Hide_menu('"+getactiveid+"');",600);
	}

	function Hide_menu(getactiveid){
		document.getElementById(getactiveid).style.visibility='hidden';
		//document.getElementById(getactiveid).style.position='absolute';
	}



FlashClass = {
	getFlashVersion:
		function (){ 
		  // ie 
		  try { 
			try {
			  var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6'); 
			  try { axo.AllowScriptAccess = 'always'; } 
			  catch(e) { return '6,0,0'; } 
			} catch(e) {} 
			return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1]; 
		  // other browsers 
		  } catch(e) { 
			try { 
			  if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){ 
				return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1]; 
			  } 
			} catch(e) {} 
		  } return '0,0,0'; 
		},
	flash:
		function (getid,getmovie,get_w,get_h,getversion,getwmode)
		// function  (getid for display , getmovie.swf ,get_w,get_h, require version , [wmode1,wmode2,wmode3] )
		// wmode => transparent,opaque, xxxxxx...
		{
			var wmode=getwmode.split(',');
			var embed_params="";

			flashdisplay="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\""+get_w+"\" height=\""+get_h+"\">";
			flashdisplay+="<param name=\"movie\" value=\""+getmovie+"\">";
			flashdisplay+="<param name=\"quality\" value=\"high\">";
			var i=0;
			while(i<=wmode.length-1){
				flashdisplay+="<param name=\"wmode\" value=\""+wmode[i]+"\">";
				embed_params+=" wmode=\""+wmode[i]+"\" ";
				i++;
			}
			flashdisplay+="<embed src=\""+getmovie+"\" "+embed_params+" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"type=\"application/x-shockwave-flash\" width=\""+get_w+"\" height=\""+get_h+"\"></embed></object>";

			var checkversion = this.getFlashVersion().split(',').shift();
			if(checkversion >= getversion){
			  document.getElementById(getid).innerHTML=flashdisplay;
			}
		}
};


/*-------------------------- ChkForm() --------------------------*/
function ChkForm(){
/*----------- How to use ---------*/
// onsubmit="return ChkForm(this.name,this.email,this.message);"
// title="title name": for display on alert
// alt="email": Email format / alt="number": Number only
/*----------- End How to use ------*/

	n=ChkForm.arguments.length;
	err=0;
	errmsg="";
	errmsg_last="";
	input_bgcolor="#FFDFE0";	// Can modify
	for(i=0;i<n;i++){
		if(ChkForm.arguments[i].value.length==0){
			errmsg+="Please specify "+ChkForm.arguments[i].getAttribute("title")+" \n";
			ChkForm.arguments[i].style.backgroundColor=input_bgcolor;
			err=1;
		}else{
			ChkForm.arguments[i].style.backgroundColor='';
		}
		if(ChkForm.arguments[i].getAttribute("alt")=="email"){
			if(isEmail(ChkForm.arguments[i].value)==false){
				errmsg_last+=ChkForm.arguments[i].getAttribute("title")+": Email Address is not correct \n";
				ChkForm.arguments[i].style.backgroundColor=input_bgcolor;
				err=1;
			}else{
				if(ChkForm.arguments[i].value.length>0){ ChkForm.arguments[i].style.backgroundColor=''; }
			}
		}
		if(ChkForm.arguments[i].getAttribute("alt")=="number"){
			if(isNumeric(ChkForm.arguments[i].value)==false){
				errmsg_last+=ChkForm.arguments[i].getAttribute("title")+": Please number only \n";
				ChkForm.arguments[i].style.backgroundColor=input_bgcolor;
				err=1;
			}else{
				if(ChkForm.arguments[i].value.length>0){ ChkForm.arguments[i].style.backgroundColor=''; }
			}
		}
	}
	if(err==1){
		alert(errmsg+errmsg_last);
		return false;
	}
	return true;
}
// returns true if the string is a valid email
function isEmail(str){
	var re = /^[^\s()<>@,;:\/]+@\w[\w\.-]+\.[a-z]{2,}$/i
	return re.test(str);
}
// returns true if the string only contains characters 0-9 and is not null
function isNumeric(str){
	var re = /[\D]/g
	if (re.test(str)) return false;
	return true;
}
/*-------------------------- End ChkForm() --------------------------*/