


String.prototype.trim = function()
{
    return this.replace(/(^\s*)|(\s*$)/g, "");
}


function WinGo(argURL) {
	document.location.href=argURL;
}

function ViewModeless(argURL,argW,argH,argArguments) {
	var _x = document.body.clientWidth/2  - 200;
	var _y = document.body.clientHeight/2 - 100;		
	showModelessDialog(argURL, argArguments,"font-family:Verdana; font-size:12; dialogWidth:"+argW+"px; dialogHeight:"+argH+"px; dialogLeft:" + _x + "px; dialogTop:" + _y + "; status:no; help:no; scroll:yes");
}


function ViewModelessNoScroll(argURL,argW,argH,argArguments) {
	var _x = document.body.clientWidth/2  - 200;
	var _y = document.body.clientHeight/2 - 100;		
	showModelessDialog(argURL, argArguments,"font-family:Verdana; font-size:12; dialogWidth:"+argW+"px; dialogHeight:"+argH+"px; dialogLeft:" + _x + "px; dialogTop:" + _y + "; status:no; help:no; scroll:no");
}


function CommonModeless(argURL,argX,argY,argW,argH,argArguments) {	
	showModelessDialog(argURL, argArguments,"font-family:Verdana; font-size:12; dialogWidth:"+argW+"px; dialogHeight:"+argH+"px; dialogLeft:" + argX + "px; dialogTop:" + argY + "; status:no; help:no; scroll:no");
}


function ChkRadio(obj) {
	var i;
	var chk=false
			
	for (i=0; i<obj.length; i++) {
		if (obj[i].checked) {
			chk = true;
			break;
		}
	}
	return chk;		
}


//style="cursor:hand" onClick="opnBigImg(this);"
function opnBigImg(obj) {
	var oPopup = window.createPopup();
    var oPopBody = oPopup.document.body;
	    
	var _x = document.body.clientWidth/2  - 200;
	var _y = document.body.clientHeight/2 - 100;	
	    
    oPopBody.style.backgroundColor = "lightyellow";
    oPopBody.style.border = "solid black 1px";
    oPopBody.innerHTML = "<img src='" + obj.src + "' width=320 height=240 >";
    oPopup.show( _x, _y, 320, 240, document.body);
}


function opnFullBigImg(obj) {
	var oPopup = window.createPopup();
    var oPopBody = oPopup.document.body;
	    
	//var _x = document.body.clientWidth/2  - 200;
	//var _y = document.body.clientHeight/2 - 100;	
	
	_x = 50;
	_y = 50;
	    
    oPopBody.style.backgroundColor = "lightyellow";
    oPopBody.style.border = "solid black 1px";
    oPopBody.innerHTML = "<img src='" + obj.src + "'>";
    oPopup.show( _x, _y, obj.width, obj.height, document.body);
}



function TopShowFlash(argSWF) {
	var strTopFlash;
	strTopFlash = "<div id='Layer1' style='position:absolute; left:8px; top:21px; width:790px; height:114px; z-index:2'>"
	strTopFlash = strTopFlash + "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'  codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='790' height='114' id=ShockwaveFlash1>"
	strTopFlash = strTopFlash + "    <param name='movie' value='" + argSWF + "'>"
	strTopFlash = strTopFlash + "    <param name='quality' value='high'>"
	strTopFlash = strTopFlash + "    <param name='scale' value='exactfit'>"
	strTopFlash = strTopFlash + "    <param name=wmode value=transparent>"
	strTopFlash = strTopFlash + "   <embed src='" + argSWF + "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='790' height='114' scale='exactfit'></embed></object>"
	strTopFlash = strTopFlash + "</div>"; 
	document.writeln(strTopFlash);
}


function ShowFlash(argSWF,argW,argH) {
	var strTopFlash;
	strTopFlash = "";
	strTopFlash = strTopFlash + "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'  codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='" + argW + "' height='" + argH + "' id=ShockwaveFlash1>"
	strTopFlash = strTopFlash + "    <param name='movie' value='" + argSWF + "'>"
	strTopFlash = strTopFlash + "    <param name='quality' value='high'>"
	strTopFlash = strTopFlash + "    <param name=wmode value=transparent>"
	strTopFlash = strTopFlash + "   <embed src='" + argSWF + "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='" + argH + "' height='" + argH + "'></embed></object>"
	document.writeln(strTopFlash);
}


function ShowGongJi() {
		ObjGongJi[0].style.display = "";
		ObjGongJi[1].style.display = "";
		
		ObjBodo[0].style.display = "none";
		ObjBodo[1].style.display = "none";
		
		ObjGuin[0].style.display = "none";
		ObjGuin[1].style.display = "none";		
	}
	
	function ShowBodo() {
		ObjBodo[0].style.display = "";
		ObjBodo[1].style.display = "";	
	
		ObjGongJi[0].style.display = "none";
		ObjGongJi[1].style.display = "none";
		
		ObjGuin[0].style.display = "none";
		ObjGuin[1].style.display = "none";			
	}	
	
	function ShowGuin() {
		ObjGuin[0].style.display = "";
		ObjGuin[1].style.display = "";	
	
		ObjBodo[0].style.display = "none";
		ObjBodo[1].style.display = "none";
	
		ObjGongJi[0].style.display = "none";
		ObjGongJi[1].style.display = "none";
	}		


	///////////////////  ²¥·ÅÆ÷  //////////////////
	function WMPPlay()  {
		ObjImgMedia.style.display="none";
		WMP.style.display="block";

		WMP_Play();
	}

	function WMPStop()  {
		ObjImgMedia.style.display="block";
		WMP.style.display="none";
		WMP_Stop();
	}
	
	
	function WMP_Stop() {document.WMP.stop();}
	function WMP_Pause() {document.WMP.pause();}
	function WMP_Play() {document.WMP.play();}