<!--
	//document.domain = "netmarble.net";
	function f_PopResize() {
		var objBody = self.document.body;
		var objWin = self;
		var nHeight = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight);
		var nWidth, nWidthTmp;
		nWidth	= document.body.scrollWidth+10;
		nHeight	= document.body.scrollHeight+29;
		self.resizeTo(nWidth,nHeight);
	}
	function f_OnMouseOver(obj) {
		obj.style.textDecoration='underline';
		obj.style.color='#333333';
	}
	function f_OnMouseOut(obj) {
		obj.style.textDecoration='none';
		obj.style.color='#333333';
	}
	function f_add_fav(strFrmName,strTargetID) {
		self.frames[strFrmName].location = '/Agit/comn/Exe_Comn.asp?elmExeAct=AddFav&t_id='+strTargetID
	}
	function f_GoMyInfo(strGoMenu) {
		if(typeof(top.loc_frm)=='object') {
			top.loc_frm.location.href='/Agit/Comn/Exe_Comn.asp?elmExeAct=GoMyInfo&elmGoURL=' + strGoMenu;
		} else {
			alert('¶Ô²»Æð£¬Ö´ÐÐ·½Ê½´íÎó£¬Çë¼ì²é²Ù×÷»ò±¨¸æ¹ÜÀíÔ±£¡');
			top.location.href='/';
		}
	}	
	function openNewHompyWin(strUserCode, strTargUrl) {
		arrHompyWin[strUserCode] = window.open(strTargUrl, "", "width=1000,height=700,top=0,left=0,resizable=no,scrollbars=no");
	}
	function openHompyWin(strUserID, strGoURL) {
		if ( !strUserID ) 
			return;
		if ( !strGoURL )
			strGoURL = "";
		var strUserCode = makeUserId(strUserID).toUpperCase();
		var strTargUrl = '/Agit/AgitWin/?o_id='+encode_url_para(strUserID)+'&GoURL='+strGoURL
		if ( typeof(arrHompyWin) != "object" )
			arrHompyWin = new Object();
		
		if ( typeof(arrHompyWin[strUserCode]) != "object" || arrHompyWin[strUserCode].closed ) 
			openNewHompyWin(strUserCode, strTargUrl);
		else {
			try {
				arrHompyWin[strUserCode].location.replace(strTargUrl);
				arrHompyWin[strUserCode].focus();
			}
			catch(x) {
				openNewHompyWin(strUserCode, strTargUrl);
			}
		}
	}
	function getFriendCnt(targWin) {
		watchCntWin=targWin;
		msgSend("WATCHCNT");
	}

//	function f_hompyCount_new(menuNum, url) {
		//alert(url);
		//?Error
		//location.href='/_common/AvatarCount.asp?menuNum='+menuNum+'&type=hompy';
		//alert(location.href);
//		if(url != null) document.location.href = url;	
//	}
	function f_openAgit(strUserID,strGoURL) {
		var targFrame, strWinName, objAgit;
		if ( !strGoURL )
			strGoURL = "";
		if ( ISObject(targFrame = ret_appletFrame(self)) ) 
			targFrame.openHompyWin(strUserID,strGoURL);
		else 
			openWin('/Agit/AgitWin/?o_id='+encode_url_para(strUserID)+'&GoURL='+strGoURL, 1000, 700);
		/*
		if ( !ISObject(targFrame = ret_appletFrame(self)) ) 
			targFrame = self;
		if ( !strGoURL )
			strGoURL = "";
		strWinName = id2frame_name(strUserID);
		objAgit =  targFrame.openWinN('/Agit/AgitWin/?o_id='+encode_url_para(strUserID)+'&GoURL='+strGoURL,strWinName, 1000, 700, 0);*/
	}
	function f_GoodPMenuCount() {
		if (typeof top.loc_frm == 'object') {
			top.loc_frm.location.href='/_common/GoodPClickCount.asp';
		}
	}

	function f_mainMenuCount(no) {	
		/*
		if (typeof top=='object'){	
			if (typeof top.main == 'object'){				
				if (top.main.location.pathname == "/" || top.main.location.pathname == "/main.asp") {					
					top.loc_frm.location.href='/_common/ClickCount.asp?no='+no;
				}
			}
		}
		*/
	}

	function f_avatarCount(menuNum, url) {
		if (typeof top.loc_frm == 'object')
		{
			top.loc_frm.location.href='/_common/AvatarCount.asp?menuNum='+menuNum+'&type=avatar';
		}else
		{
			location.href='/_common/AvatarCount.asp?menuNum='+menuNum+'&type=avatar';
		}
		if(url != null) document.location.href = url;
	}
//	function f_avatarCount_home(menuNum, url) {
//		if (typeof top.loc_frm == 'object'){
//		top.loc_frm.location.href='/_common/AvatarCount.asp?menuNum='+menuNum+'&type=avatar';
//		}else
//		{
//			location.href='/_common/AvatarCount.asp?menuNum='+menuNum+'&type=avatar';
//		}
//		if(url != null) document.location.href = url;
//	}
	function f_hompyCount(menuNum, url) {
		//alert(menuNum);
		if (typeof top.loc_frm == 'object')
		{
			top.loc_frm.location.href='/_common/AvatarCount.asp?menuNum='+menuNum+'&type=hompy';
		}
		else
		{
			location.href='/_common/AvatarCount.asp?menuNum='+menuNum+'&type=hompy';
		}
		if(url != null) document.location.href = url;	
	}
//	function f_hompyCount_home(menuNum, url) {
//		//alert(menuNum);
//		if (typeof top.loc_frm == 'object'){
//			top.loc_frm.location.href='/_common/AvatarCount.asp?menuNum='+menuNum+'&type=hompy';
//		}
//		else
//		{
//			location.href='/_common/AvatarCount.asp?menuNum='+menuNum+'&type=hompy';
//		}
//		if(url != null) document.location.href = url;	
//	}
	function f_comicCount(strgame) {
		//alert(strgame);
		if (typeof top.loc_frm == 'object'){
			top.loc_frm.location.href='/_common/ComicCount.asp?game='+strgame;
		}
		else
		{
			location.href='/_common/ComicCount.asp?game='+strgame;
		}
	}
	function f_clickCount(no) {
		if (typeof top.loc_frm == 'object'){
			top.loc_frm.location.href='/_common/ClickCount.asp?no='+no;
		}
		else
		{
			location.href='/_common/ClickCount.asp?no='+no;
		}//openWin('/_common/ClickCount.asp?no='+no,400,500);
	}
	function f_plazaCount(no) {
		if (typeof top.loc_frm == 'object'){
			top.loc_frm.location.href='/_common/PlazaCount.asp?no='+no;
		}
		else
		{
			location.href='/_common/PlazaCount.asp?no='+no;
		}
	}
	function f_noticeCount(page,width,height,no) {
		if (typeof top.loc_frm == 'object'){
			top.loc_frm.location.href='/_common/NoticeCount.asp?no='+no;
		}
		else
		{
			location.href='/_common/NoticeCount.asp?no='+no;
		}
		openWin(page,width,height);
	}
	function f_noticeCount1(no) {
		cHidden.location.href='/_common/NoticeCount.asp?no='+no;
	}
	function f_cchatCount(no) {
		if (typeof top.loc_frm == 'object'){
			top.loc_frm.location.href='/_common/ChatCount.asp?no='+no;
		}
		else
		{
			location.href='/_common/ChatCount.asp?no='+no;
		}
	}
	function f_chkFileFormat(strFileName,arrFileFormat) {
		var arrFileName = strFileName.split('.');
		var nArraySize = arrFileName.length;
		var strFileFormat = arrFileName[nArraySize-1].toLowerCase();
		var bValid = false;
		nArraySize = arrFileFormat.length;
		for(var i=0; i<nArraySize; i++) {
			if(strFileFormat==arrFileFormat[i]) {
				bValid = true;
			}
		}
		var arrResult = new Array(bValid,strFileFormat,arrFileFormat.join("', '"));
		return arrResult;
	}
	function f_getFileName(strFile) {
		var arrString = strFile.split('\\');
		var nStringSize = arrString.length;
		var strFileName = arrString[nStringSize-1];
		return strFileName;
	}
	function f_chkAlphaNum(strString) {
		strValid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_";
		for (var i=0; i< strString.length; i++) {
			if (strValid.indexOf(strString.charAt(i)) == -1) {
			return false;
			}
		}
		return true;
	}
	function f_chkFileName(strFile) {
		var arrString = strFile.split('\\');
		var nStringSize = arrString.length;
		var strFileName = arrString[nStringSize-1];
		arrString = strFileName.split('\.');
		nStringSize = arrString.length;
		if(nStringSize!=2) {
			return false;
		}
		var strFileName = arrString[0];
		var strFileFormat = arrString[1];
		if(!check_space(strFileFormat)) {
			return false;
		}
		if(strFileFormat.length > 4 || strFileFormat.length < 3) {
			return false;
		}
		if(strFileName.length>15) {
			return false;
		}
		if(!f_chkAlphaNum(strFileName)) {
			return false;
		}
		return true;
	}
	function f_GetSelValue(theForm,ElementName) {
		var strSelValue='';
		var idxSelect;
		var bSelected=false;
		var Element = theForm.elements[ElementName]
		var ElementLen = Element.length;
		if(typeof(ElementLen)=='undefined') {
			if(Element.checked) {
				strSelValue = Element.value;
				bSelected = true;
			}
		} else {
			for(var idxLoop=0;idxLoop<ElementLen;idxLoop++) {
				if(Element[idxLoop].checked) {
					idxSelect = idxLoop;
					strSelValue = Element[idxSelect].value;
					bSelected = true;
				}
			}
		}
		var arrReturnValue = new Array(3)
		arrReturnValue[0] = bSelected;
		arrReturnValue[1] = strSelValue;
		arrReturnValue[2] = idxSelect;
		return arrReturnValue;
	}
	function f_setSelect(Element,Val) {
		var nEleLen = Element.length;
		for( var idxLoop = 0; idxLoop < nEleLen; idxLoop++) {
			if(Element[idxLoop].value == Val) {
				Element[idxLoop].selected = true;
			}
		}
	}
	function f_setChkVal(strVal,objEle) {
		var nEleLen = objEle.length;
		for(var i=0; i<nEleLen; i++) {
			if (objEle[i].value.toString() == strVal.toString()) {
				objEle[i].checked = true;
			}
		}
	}
	function f_SetReadOnly(theForm,bStart) {
		var bReadOnly;
		if(bStart == 1) {
			bReadOnly = true;
		} else {
			bReadOnly = false;
		}
		var nLen = theForm.elements.length;
		for(var i=0; i<nLen; i++) {
			theForm.elements[i].readOnly = bReadOnly;
		}
	}
	function f_TogleScrl() {
		var objBody  = document.body;
		var strOverFlow = objBody.style.overflow;
		if(strOverFlow=='') {
			objBody.style.overflow = 'hidden';
		} else {
			objBody.style.overflow = '';
		}
	}
	function f_doBlink() {
		var blink = document.all.tags("BLINK")
		for (var i=0; i < blink.length; i++)
		blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : ""
	}
	function f_startBlink() {
		if (document.all)
		setInterval("f_doBlink()",1000)
	}
	function f_TogShowHide(LayerName) {
		var DisplayVal = document.all[LayerName].style.display;
		if(DisplayVal=='none') {
			document.all[LayerName].style.display = 'block';
		} else {
			document.all[LayerName].style.display = 'none';
		}
	}
	function f_arrTogShowHideClose(sel,Name) {
		var nLayerLen = document.all[Name].length;
		for(var i=0;i<nLayerLen;i++) {
			document.all[Name][i].style.display='none';
		}
		document.all[Name][sel].style.display='block';
	}
	function f_arrTogShowHide(sel,Name) {
		var DisplayVal = document.all[Name][sel].style.display;
		if(DisplayVal=='block') {
			document.all[Name][sel].style.display = 'none';
		} else {
			document.all[Name][sel].style.display = 'block';
		}
	}
	function f_show_hide(bShow,LayerName) {
		if ( bShow == "show" ) {
			field1 = "visible";
			field2 = "static";
		} else if (bShow == "hide") {
			field1 = "hidden";
			field2 = "absolute";
		}
		document.all[LayerName].style.visibility = field1;		
		document.all[LayerName].style.position = field2;		
	}
	function f_show_hide_sub(bshow,LayerName,SubLayerName) {
		if ( bshow == "show" ) {
			field1 = "visible";
			field2 = "static";
		} else if (bshow == "hide") {
			field1 = "hidden";
			field2 = "absolute";
		}
		document.all[LayerName].all[SubLayerName].style.visibility = field1;		
		document.all[LayerName].all[SubLayerName].style.position = field2;		
	}
	function MM_swapImgRestore() { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}

	function MM_preloadImages() { //v3.0
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}

	function MM_findObj(n, d) { //v4.0
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && document.getElementById) x=document.getElementById(n); return x;
	}

	function MM_swapImage() { //v3.0
	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}
	function f_callColorPicker(tmpx,tmpy) {
		var x = event.screenX - event.clientX - document.body.scrollLeft;
		var y = event.screenY - event.clientY - document.body.scrollTop;

		x = x + tmpx;
		y = y + tmpy;

		var Selcol = f_showColorPicker(x,y);
		return Selcol;
	}

	function f_showColorPicker(x,y) {
		var Selcol = showModalDialog("/_common/pall.asp","","font-family:Verdana; font-size:12; dialogWidth:202px; dialogHeight:189px; dialogLeft:" + x + "px; dialogTop:" + y + "px; help:no; scroll:no"); 
		// status:no;
		return Selcol;
	}
	function callColorPicker(tmpx,tmpy) {
		var x = event.screenX - event.clientX - document.body.scrollLeft;
		var y = event.screenY - event.clientY - document.body.scrollTop;

		x = x + tmpx;
		y = y + tmpy;

		showColorPicker(x,y);
		return;
	}

	function showColorPicker(x,y) {
		var Selcol = showModalDialog("/_common/pall.asp","","font-family:Verdana; font-size:12; dialogWidth:202px; dialogHeight:162px; dialogLeft:" + x + "px; dialogTop:" + y + "px; status:no; help:no; scroll:no"); 
		if(Selcol != "") {
			document.all.calinput.style.backgroundColor = Selcol;
			document.Send.ChatFontColor.value = Selcol;
		}
		return;
	}

	function check_cnt(form,strName) {
		var checkcnt = 0;

		for (var i = 0;i<form.length;i++) {
				if(form.elements[i].name==strName && form.elements[i].checked){

				checkcnt++;
				}
  		}
  		return checkcnt;
	}
	function f_chk_all(theForm,bChked,strName) {
		var strSet='';
		if(bChked) {
			strSet = true;
		} else {
			strSet = false;
		}
		for( var i=0; i<theForm.elements.length; i++) {
			var objElm = theForm.elements[i];
			if(objElm.name == strName)
				objElm.checked = strSet;
		}
		return;
	}
	function revcheck(theForm,strName) {
		for( var i=0; i<theForm.elements.length; i++) {
			var select = theForm.elements[i];
			if(select.name == strName)
				select.checked = !select.checked;
		}
		return;
	}
	function openWinN(url,wName, w, h, bScroll) {
		var PopWin = openWinW(url,wName,w,h,'','',bScroll);
	}
	function openWinY(url, w, h) {
		var PopWin = openWinW(url,'_blank',w,h,'','',1);
	}

	function openWinYGoUrl(url, w, h) {
		if (typeof(top.Applet)!="object")
		{
			url="http://igame.sina.com.cn"+url;
		}
		var PopWin = openWinW(url,'_blank',w,h,'','',1);
	}

	function openWin(url, w, h) {
		var PopWin = openWinW(url,'_blank',w,h,'','',0);
	}
	function openWinW(strUrl,strWName,nW,nH,nT,nL,bScroll) {
		var sOption = "";
		var strScroll;
		var nSW = screen.width;
		var nSH = screen.height;
		var nPointW = 0, nPointH = 0;
		if(nT == '' || nL == '') {
			if(nW < nSW) {
				nPointW = (nSW - nW) / 2;
			}
			if(nH < nSH) {
				nPointH = (nSH - nH) / 2 - 40;
			}
		} else {
			nPointW = nL;
			nPointH = nT;
		}
		if (bScroll == 0) {
			strScroll = " scrollbars=no";
		} else {
			strScroll = " scrollbars=yes";
		}
		sOption = sOption + "toolbar=no, channelmode=no, location=no, directories=no, resizable=yes, menubar=no," + strScroll;
		sOption = sOption + ", width=" + nW + ", height=" + nH + ", top=" + nPointH + ", left=" + nPointW;
		var PopWin = window.open(strUrl, strWName, sOption);
		if (typeof(PopWin)=='object')
		{
			PopWin.focus();
			return PopWin;
		}
	}
	function f_MainGoURL(strURL) {
		var strEnURL = encode_url_para(strURL);
		top.location.href = '/GoURL.asp?GOURL=' + strEnURL;
	}
	function CloseNgoURL(URL) {
		opener.location = URL;
		self.close();
	}
	function CloseNgoURL2(URL) {
		var targ_Win = self.opener
		if ( typeof(targ_Win) == "object" ) {
			targ_Win = ( typeof(targ_Win.top.main) == "object" ? targ_Win.top.main : targ_Win.top );
			targ_Win.location.href = URL;
		}
		self.close();
	}
	function f_MakeWin(strBody,nW,nH,bS) {
		var popWIn=window.open('about:blank','','toolbar=0, channelmode=0, location=0, directories=0, resizable=1, menubar=0, scrollbars='+bS+',width='+nW+',height='+nH);
		popWIn.document.write(strBody);
	}
	function getCookie( name ){
		var nameOfCookie = name + "=";
		var x = 0;
		while ( x <= document.cookie.length )
		{
			var y = (x+nameOfCookie.length);
			if ( document.cookie.substring( x, y ) == nameOfCookie ) {
				if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
				endOfCookie = document.cookie.length;
				return unescape( document.cookie.substring( y, endOfCookie ) );
			}
				
			x = document.cookie.indexOf( " ", x ) + 1;
				
			if ( x == 0 ) break;
		}
				return "";
	}
	function setCookie( name, value, expiredays ) { 
	        var todayDate = new Date(); 
	        todayDate.setDate( todayDate.getDate() + expiredays ); 
	        document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
	} 
	function AlpaNumber(string) {
		valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
		for (var i=0; i< string.length; i++) {
			if (valid.indexOf(string.charAt(i)) == -1) {
			return false;
			}
		}
		return true;
	}
	function AlpaNumberDot(string) {
		valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.";
		for (var i=0; i< string.length; i++) {
			if (valid.indexOf(string.charAt(i)) == -1) {
			return false;
			}
		}
		return true;
	}
	function NoNumber(string) {
		if (!f_chkNoNum(string)) {
			alert("²»ÄÜ°üÀ¨Êý×Ö.");
			return false;
		}
		return true;
	}
	function f_chkNoNum(string) {
		valid = "0123456789";
		for (var i=0; i< string.length; i++) {
			if (valid.indexOf(string.charAt(i)) != -1) {
				return false;
			return false;
			}
		}
		return true;
	}
	function OnlyNumber(string) {
		if (!f_chkOnlyNum(string)) {
			alert("Ö»ÄÜÊäÈëÊý×Ö");
			return false;
		}
		return true;
	}
	function f_chkOnlyNum(string) {
		valid = "0123456789";
		for (var i=0; i< string.length; i++) {
			if (valid.indexOf(string.charAt(i)) == -1) {
				return false;
			}
		}
		return true;
	}
	function check_space(str) {
		if (str.search(/\S/)<0) {
			return false;
		}
		var temp=str.replace(' ','');
		if (temp.length == 0) {
			return false;
		}
		return true;
	}
	function calbyte(aquery) {
		var tmpStr;
		var temp=0;
		var onechar;
		var tcount;
		tcount = 0;
			 
		tmpStr = new String(aquery);
		temp = tmpStr.length;

		for (k=0;k<temp;k++) {
			onechar = tmpStr.charAt(k);
			onechar_1 = escape(onechar);
			if ( onechar_1.charAt(0) == "%" ) {
				onechar_1 = onechar_1.substring(1,2);
				switch ( onechar_1 ) {
				case "0":
				case "1":
				case "2":
				case "3":
				case "4":
				case "5":
				case "6":
				case "7":
					tcount++;
					break;
				default:
					tcount += 2;
					break;
				}
			}
			else if (onechar!='\r') {
				tcount++;
			}
		}
		return tcount;
	}
	function f_chkRegID(strRegID1,strRegID2) {
		if (chksumID(strRegID1,strRegID2) == false) {
			alert('¿Ã¹Ù¸¥ ÁÖ¹Îµî·Ï¹øÈ£°¡ ¾Æ´Õ´Ï´Ù.');
			return false;
		}

		if (ValidRegNo(strRegID1,strRegID2) == false) {
			alert('¿Ã¹Ù¸¥ ÁÖ¹Îµî·Ï¹øÈ£°¡ ¾Æ´Õ´Ï´Ù.');
			return false;
		}

		if (ValidRegNo2(strRegID1) == false) {
			alert('¿Ã¹Ù¸¥ ÁÖ¹Îµî·Ï¹øÈ£°¡ ¾Æ´Õ´Ï´Ù.');
			return false;
		}
			
		return true;
	}
	function chksumID(strRegID1,strRegID2) {
	    str1 = strRegID1.value;
	    str2 = strRegID2.value;
	    var li_lastid,li_mod,li_minus,li_last;
	    var value0,value1,value2,value3,value4,value5,value6;
	    var value7,value8,value9,value10,value11,value12;
	    
	    if (f_chkOnlyNum(str1) &&  f_chkOnlyNum(str2)) {
	        li_lastid    = parseFloat(str2.substring(6,7));
	        value0  = parseFloat(str1.substring(0,1))  * 2;
	        value1  = parseFloat(str1.substring(1,2))  * 3;
	        value2  = parseFloat(str1.substring(2,3))  * 4;
	        value3  = parseFloat(str1.substring(3,4))  * 5;
	        value4  = parseFloat(str1.substring(4,5))  * 6;
	        value5  = parseFloat(str1.substring(5,6))  * 7;
	        value6  = parseFloat(str2.substring(0,1))  * 8;
	        value7  = parseFloat(str2.substring(1,2))  * 9;
	        value8  = parseFloat(str2.substring(2,3))  * 2;
	        value9  = parseFloat(str2.substring(3,4))  * 3;
	        value10 = parseFloat(str2.substring(4,5))  * 4;
	        value11 = parseFloat(str2.substring(5,6))  * 5;
	        value12 = 0;
	        
	        value12 = value0+value1+value2+value3+value4+value5+value6+value7+value8+value9+value10+value11+value12 ;
	        
	        li_mod = value12 %11;
	        li_minus = 11 - li_mod;
	        li_last = li_minus % 10;
	        if (li_last != li_lastid){
	            strRegID2.select();
	            strRegID2.focus();
	            return false;
	        } else
	            return true;
		} else
	    strRegID2.select();
	    strRegID2.focus();
	    return false;
	}
	function ValidRegNo(strRegID1,strRegID2) {
	    strReg1 = strRegID1.value;
	    strReg2 = strRegID2.value;
	    sGender = strReg2.substring(0,1);
	    sYear = strReg1.substring(0,2);
	    sMonth = new Number(strReg1.substring(2,4));
	    sDay = new Number(strReg1.substring(4,6));
	    
	    if (sMonth < 1 || sMonth > 12 || sDay < 1 || sDay > 31) {
			return false;
	    }
		if (sGender > 4 || sGender < 0) {
			return false;
		}
		
/*		if (sYear != '00') {
			if ((sGender != '1') && (sGender != '2')) {
				return false;
			}
		}
*/	    
	    return true;
	}

	function ValidRegNo2(strRegID1) {
	    strReg1 = strRegID1.value;

		a = new String(strReg1);

		if(a == '') return false;
		if(a.length != 6 ) return false;

		intYear = parseInt(a.substring(0,2) , 10);
		intMonth = parseInt(a.substring(2,4) , 10);
		intDay = parseInt(a.substring(4,6) , 10);
		
		if(intMonth < 0 || intMonth > 12){ 
			return false;
		}
			
		switch(intMonth){
			case 2 :
				if(intDay < 0 || intDay > 29){
					return false;
					breake;
				}
			case 4 :
				if(intDay < 0 || intDay > 30){
					return false;
					breake;
				}
			case 6 :
				if(intDay < 0 || intDay > 30){
					return false;
					breake;
				}
			case 9 :
				if(intDay < 0 || intDay > 30){
					return false;
					breake;
				}
			case 11 :
				if(intDay < 0 || intDay > 30){
					return false;
					breake;
				}
			default :
				if(intDay < 0 || intDay > 31){
					return false;
					breake;
				}
		}
	    
	    return true;
	}
	function ssn_check(theForm) {
		if (!f_chkRegID(theForm.ssn1, theForm.ssn2)) {
			return false;
		}
		return true;
	}

	function f_chkEmail(strEmail) {
		if (!check_space(strEmail)) {
			alert('EMailµØÖ·²»ÄÜÎª¿Õ...');
			return false;
		}
		if (strEmail.search(/(\S+)@(\S+)\.(\S+)/) == -1 ) {
			alert("EMailµØÖ·²»ÕýÈ·...");
		    return false;    
		}
		var EmailStr = strEmail;
		var idxn = 1;
		while (idxn != -1) {
			EmailStr = EmailStr.replace('_','');
			idxn = EmailStr.indexOf('_');
		}
		idxn = 1;
		while (idxn != -1) {
			EmailStr = EmailStr.replace('-','');
			idxn = EmailStr.indexOf('-');
		}
		var EmailStrLen = EmailStr.length;
		idxn = EmailStr.indexOf('@');
		tempStr = EmailStr.substring(0,idxn);
		if (!AlpaNumberDot(tempStr)) {
			alert("EMailµØÖ·²»ÕýÈ·...");
		    return false;    
		}
		while (idxn != -1) {
			EmailStr = EmailStr.substring(idxn+1,EmailStrLen);
			EmailStrLen = EmailStr.length;
			idxn = EmailStr.indexOf('.');
			if (idxn == -1) {
				tempStr = EmailStr;
			} else {
				tempStr = EmailStr.substring(0,idxn);
			}
			if (!AlpaNumber(tempStr)) {
				alert("EMailµØÖ·²»ÕýÈ·...");
			    return false;    
			}
		}
		return true;

	}
	function email_check(theForm) {
		str=theForm.email.value;

		if(!f_chkEmail(str)) {
		    theForm.email.focus();
		    return false;
		}
		return true;
	}
	function objVisibility(obj,_visibility,subwidth){
		ww = document.body.offsetWidth;
		if(ww > 1000) psubwidth=(ww-1000)/2
		if(document.layers) document.layers[obj].visibility = (_visibility == "visible")? "show" : "hide"
		else {
			document.all[obj].style.visibility = _visibility;
			document.all[obj].style.left = subwidth+psubwidth;
		}
	}

	tog_subobj = 0
	function topmenu(subobj,subwidth){
		if(tog_subobj == subobj) return
		if(tog_subobj != 0) objVisibility("menusub"+tog_subobj,"hidden",subwidth)
		objVisibility("menusub"+subobj,"visible",subwidth)
		tog_subobj = subobj
	}
	function ifrmreSize(ifrm_Name) {
		var objBody     = frames[ifrm_Name].document.body;
		var objFrame = document.all[ifrm_Name];
		objFrame.style.height = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight)
		objFrame.style.width = objBody.scrollWidth + (objBody.offsetWidth - objBody.clientWidth)
	}

	function ifrm_init(ifrm_Name) {
		parent.ifrmreSize(ifrm_Name);
		parent.document.location.href = parent.document.location.href+"#";
	}

	function ltrim(str) 
	{ 
	        var s = new String(str); 

	        if (s.substr(0,1) == " ") 
	                return ltrim(s.substr(1)); 
	        else 
	                return s; 
	} 

	function rtrim(str) 
	{ 
	        var s = new String(str); 
	        if(s.substr(s.length-1,1) == " ") 
	                return rtrim(s.substring(0, s.length-1)) 
	        else 
	                return s; 
	} 

	function trim(str) 
	{ 
	        return ltrim(rtrim(str)); 
	}
	function flash(){
		openWinN('/flash/gameindex.asp','flashWindow', 640, 580, 0)
	}
	function get_connectFrame(currentWin) {
		return ret_connectFrame(currentWin);
	}
	function get_mainFrame(currentWin)
	{
		return ret_mainFrame(currentWin);
	}
	
	function get_appletFrame(currentWin) {
		var ret = ret_appletFrame(currentWin);
		var current = currentWin.top.parent;
		if ( typeof(ret) == "object" )
			return ret;
		else if ( ret == -1 ) {
			alert("·þÎñÆ÷µÄÁ¬½ÓÖÐ¶Ï»òÕßÁÄÌìÖ÷´°¿Ú¹Ø±Õ.\n´°¿Ú»á×Ô¶¯¹Ø±Õ.");
			current.close();
		}
		else if ( ret == 0 ) {
			alert("Óë·þÎñÆ÷µÄÁ¬½Ó¶Ï¿ª»òÁÄÌìÖ÷´°¿Ú¹Ø±Õ");
			current.location.href = "/";
		}
	}
	function ISObject(objA) {
		return ( typeof(objA) == "object" ) 
	}
	function getOpenerWin(orgWin) {
		var retWin;
		if ( !ISObject(orgWin) || !ISObject(orgWin = orgWin.top) );
		else if ( ISObject(retWin = orgWin.dialogArguments) && !retWin.closed );
		else if ( ISObject(retWin = orgWin.opener) && !retWin.closed );
		else
			retWin = false;
		return retWin;
	}
	function fnGetTopWindow(targWin) {
		var ret = false;
		if ( ISObject(ret = targWin) && !ret.closed )
			while( ret != ret.parent ) 
				ret = ret.parent;
		return ret;
	}
	function findTargFrame(currentWin, name) {
		var current = currentWin;
		do {
			if ( ISObject(current = current.top) && ISObject(current.frames[name]) ) 
				return current.frames[name];
		}while ( ISObject(current = getOpenerWin(current)) ) ;
		return ( ISObject(getOpenerWin(currentWin)) ? -1 : 1 );
	}
	function ret_appletFrame(currentWin) {
		return findTargFrame(currentWin, "Applet");
	}
	function ret_connectFrame(currentWin) {
		return findTargFrame(currentWin, "Conneting");
	}
	function ret_mainFrame(currentWin)
	{
		return findTargFrame(currentWin,"main");
	}
	function get_bottomFrame(currentWin) {
		return findTargFrame(currentWin, "bottom");
	}
	function appletOpenWin(url,w,h) {
		var appletFrame;
		if ( typeof((appletFrame=ret_appletFrame(self))) != "object" ) 
			appletFrame = self;
		appletFrame.openWin(url,w,h);
	}
	function appletOpenScrollWin(url,w,h) {
		var appletFrame;
		if ( typeof((appletFrame=ret_appletFrame(self))) == "object" ) 
			appletFrame.openScrollWin(url,w,h);
	}
	function encode_url_para(org_para) {
		var i, ret = "", tmp_char, tmp_one_char;
		for(i=0;i<org_para.length;i++) {
			tmp_one_char = org_para.charAt(i);
			tmp_char = escape(tmp_one_char);
			if ( tmp_one_char == "+" )
				ret += "%2B";
			else if ( tmp_one_char == "€" )
				ret += "%80";
			else if ( tmp_char.length == 3 && tmp_char.charAt(0) == "%" && !isNaN(tmp_char.charAt(1)) && tmp_char.charAt(1) < 8 )
				ret += tmp_char;
			else
				ret += tmp_one_char;	
		}
		return ret;
	}
	
	//¹®ÀÚ¿­ ºñ±³ ÇÔ¼ö
	function strcmp(strA, strB) {
		return ( strA > strB ? 1 : ( strA == strB ? 0 : -1));
	}
	function streql(strA, strB) {
		return ( strcmp(strA, strB) == 0 );
	}
	function stricmp(strA, strB) {
		if ( typeof(strA) == "string" && typeof(strB) == "string" )
			return strcmp(strA.toUpperCase(),strB.toUpperCase());
		else
			return -1;
	}
	function strieql(strA, strB) {
		return ( stricmp(strA, strB) == 0 );
	}
	function OpenSms() {
		openWin('/_common/sms/',400,500);
		// alert('¼­ºñ½º Á¡°Ë ÁßÀÔ´Ï´Ù.');
	}
	function getNewMemoCount() {
		var appletFrame, memoCnt = 0;
		if ( ISObject(appletFrame = ret_appletFrame(self)) )
			memoCnt = appletFrame.getNewMemoCnt();
		return memoCnt;
	}
	function getAppletUserID() {
		var appletFrame=ret_appletFrame(self);
		return ( ISObject(appletFrame) ? appletFrame.get_user_id() : "" );
	}
	function fnShowAppletFrame() {
		var appletFrame, strRowSize;
		if ( typeof(appletFrame=ret_appletFrame(self)) != "object" )
			return;
		appletFrame.top.document.body.rows  = appletFrame.top.document.body.rows.replace(/\,[\s0-9]+$/g, ","+(appletFrame.bShowFrame() ? 0 : 110 ));	
	}
	function chkUrlNOpenOrHref(strUrl) {
		var appletFrame;
		if ( ISObject(appletFrame = ret_appletFrame(self)) )
			appletFrame.chkUrlNOpenOrHref(strUrl);
	}
	if ( typeof(makeUserId) == "undefined" )
		document.write("<script language='javascript' src='http://igame.sina.com.cn/chat/common/id_convert.js'></script>");
	if ( typeof(cash) == "undefined" )
		document.write("<script language='javascript' src='http://igame.sina.com.cn/Shop/common/cash_charge.js'></script>");
		
	function F_MsgBox_Modeless(url, w, h)
	{
	var strFeatures = "status:no;dialogWidth:"+w+"px;dialogHeight:"+h+"px;center:yes;scroll:no;unadorned:no;help:no;";
	var winMsgBox = window.showModelessDialog(url, new Array(window, opener), strFeatures);
	}

	function goURL(strURL)
	{
		strURL = strURL.toLowerCase();
		if ((strURL.substring(0,4)=='http')&&(strURL.substring(0,25)!='http://igame.sina.com.cn/'))
		{
			top.location.href=strURL
		}
		else
		{
			if(typeof(top.Applet)=="object")
			{
				top.main.location.href="http://igame.sina.com.cn"+unescape(strURL);
			}
			else
			{
				top.location.href="http://igame.sina.com.cn/goURL.asp?gourl="+strURL;
			}
		}
	}
	
	function popURL(strURL,blnFrame)
	{
		strURL = strURL.toLowerCase();
		if((strURL.substring(0,4)=='http')||(strURL.substring(0,25)=='http://igame.sina.com.cn/'))
		{
			window.open(strURL);
		}
		else
		{
			if(typeof(top.Applet)=="object")
			{
				window.open("http://igame.sina.com.cn"+unescape(strURL));
			}
			else
			{
				window.open('http://igame.sina.com.cn/gourl.asp?gourl=' + strURL);
			}
		}
	}

	function goto_pop_win(theUrl,theWidth,theHeight){
		var l=10;
		var t=10;
		window.open(theUrl,"SuperGamerDetail","resizable=0,scrollbars=yes,width="+theWidth+",height="+theHeight+",top="+t+",left="+l);
	}

/*	function fn_frmSubmit(frmForm)
	{
		if(typeof(top.Applet)=="object")
		{
			frmForm.action="http://igame.sina.com.cn/member/login/sLogin_ing.asp"
			frmForm.submit();
		}
		else
		{
			frmForm.action="http://igame.sina.com.cn/member/login/outLogin_ing.asp"
			frmForm.submit();
		}
	}*/
//-->

/**
 * FlashObject v1.3d: Flash detection and embed - http://blog.deconcept.com/flashobject/
 *
 * FlashObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof com=="undefined"){var com=new Object();}
if(typeof com.deconcept=="undefined"){com.deconcept=new Object();}
if(typeof com.deconcept.util=="undefined"){com.deconcept.util=new Object();}
if(typeof com.deconcept.FlashObjectUtil=="undefined"){com.deconcept.FlashObjectUtil=new Object();}
com.deconcept.FlashObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
if(!document.createElement||!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=com.deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
this.useExpressInstall=_7;
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new com.deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=com.deconcept.FlashObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}
};
com.deconcept.FlashObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},createParamTag:function(n,v){
var p=document.createElement("param");
p.setAttribute("name",n);
p.setAttribute("value",v);
return p;
},getVariablePairs:function(){
var _19=new Array();
var key;
var _1b=this.getVariables();
for(key in _1b){_19.push(key+"="+_1b[key]);}
return _19;
},getFlashHTML:function(){
var _1c="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");
}
_1c="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_1c+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1d=this.getParams();
for(var key in _1d){_1c+=[key]+"=\""+_1d[key]+"\" ";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_1c+="flashvars=\""+_1f+"\"";}
_1c+="/>";
}else{
if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_1c="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_1c+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _20=this.getParams();
for(var key in _20){_1c+="<param name=\""+key+"\" value=\""+_20[key]+"\" />";}
var _22=this.getVariablePairs().join("&");
if(_22.length>0){_1c+="<param name=\"flashvars\" value=\""+_22+"\" />";
}_1c+="</object>";}
return _1c;
},write:function(_23){
if(this.useExpressInstall){
var _24=new com.deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_24)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}
}else{this.setAttribute("doExpressInstall",false);}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _23=="string")?document.getElementById(_23):_23;
n.innerHTML=this.getFlashHTML();
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}}};
com.deconcept.FlashObjectUtil.getPlayerVersion=function(_26,_27){
var _28=new com.deconcept.PlayerVersion(0,0,0);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_28=new com.deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{
try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
for(var i=3;axo!=null;i++){
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
_28=new com.deconcept.PlayerVersion([i,0,0]);}}
catch(e){}
if(_26&&_28.major>_26.major){return _28;}
if(!_26||((_26.minor!=0||_26.rev!=0)&&_28.major==_26.major)||_28.major!=6||_27){
try{
_28=new com.deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
}catch(e){}}}
return _28;
};
com.deconcept.PlayerVersion=function(_2c){
this.major=parseInt(_2c[0])||0;
this.minor=parseInt(_2c[1])||0;
this.rev=parseInt(_2c[2])||0;
};
com.deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){return false;}
return true;
};
com.deconcept.util={getRequestParameter:function(_2e){
var q=document.location.search||document.location.hash;
if(q){var _30=q.indexOf(_2e+"=");
var _31=(q.indexOf("&",_30)>-1)?q.indexOf("&",_30):q.length;
if(q.length>1&&_30>-1){
return q.substring(q.indexOf("=",_30)+1,_31);}}return "";
},removeChildren:function(n){
while(n.hasChildNodes()){
n.removeChild(n.firstChild);}}};
if(Array.prototype.push==null){
Array.prototype.push=function(_33){
this[this.length]=_33;
return this.length;};}
var getQueryParamValue=com.deconcept.util.getRequestParameter;
var FlashObject=com.deconcept.FlashObject;


//v1.0
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}



function showflash(url, w, h)
{
	str1 = "<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' WIDTH="+w+" HEIGHT="+h+">";
	str2 = "<PARAM NAME=movie VALUE='"+url+"'><PARAM NAME=quality VALUE=high>";
	str22= "<PARAM NAME=menu VALUE=false><PARAM NAME=wmode VALUE=transparent>";
	str3 = "<EMBED src='"+url+"' quality=high WIDTH="+w+" HEIGHT="+h+" TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></EMBED>";
	document.write(str1);
	document.write(str2);
	document.write(str22);
	document.write(str3);
	document.write('</OBJECT>');
}


 /**
  * @author [sina]zhangping1@
  * @version v1.1.3
  * Date:2006-9-8 2006-12-15
  * added by liuxch 2007-5-15
  */
if(typeof(sina)!="object"){var sina={}}
sina.$=function(objId){if(!objId){throw new Error("sina.$(String objId)²ÎÊý±ØÐë")}
if(document.getElementById){return eval('document.getElementById("'+objId+'")')}else if(document.layers){return eval("document.layers['"+objId+"']")}else{return eval('document.all.'+objId)}}
sinaFlash=function(C,v,x,V,c,X,i,O,I,l,o){var z=this;if(!document.createElement||!document.getElementById){return}
z.id=v?v:"";z.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";z.codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+(c?c:"7")+",0,0,0";z.width=x;z.height=V;z.movie=C;z.bgcolor=X?X:null;z.quality=O?O:"high";z.src=z.movie;z.pluginspage="http://www.macromedia.com/go/getflashplayer";z.type="application/x-shockwave-flash";z.useExpressInstall=i?i:null;z.xir=(I)?I:window.location;z.redirectUrl=l?l:null;z.detectKey=o?o:null;z.escapeIs=false;z.objAttrs={};z.params={};z.flashVars=[];z.flashVarsStr="";z.embedAttrs={};z.forSetAttribute("id",z.id);z.objAttrs["classid"]=z.classid;z.forSetAttribute("codebase",z.codebase);z.forSetAttribute("width",z.width);z.forSetAttribute("height",z.height);z.forSetAttribute("movie",z.movie);z.forSetAttribute("quality",z.quality);z.forSetAttribute("pluginspage",z.pluginspage);z.forSetAttribute("type",z.type);z.forSetAttribute("bgcolor",z.bgcolor)}
sinaFlash.prototype={getFlashHtml:function(){var I=this,i='<object ';for(var l in I.objAttrs){i+=l+'="'+I.objAttrs[l]+'" '}
i+='>';for(var l in I.params){i+='<param name="'+l+'" value="'+I.params[l]+'" /> '}
if(I.flashVarsStr!=""){i+='<param name="FlashVars" value="'+I.flashVarsStr+'" /> '}
i+='<embed ';for(var l in I.embedAttrs){i+=l+'="'+I.embedAttrs[l]+'" '}
i+=' ></embed></object>';return i},forSetAttribute:function(I,i){var l=this;I=I.toLowerCase();switch(I){case "classid":break;case "pluginspage":l.embedAttrs["pluginspage"]=i;break;case "src":l.embedAttrs["src"]=i;l.params["movie"]=i;break;case "movie":l.params["movie"]=i;l.embedAttrs["src"]=i;break;case "onafterupdate":case "onbeforeupdate":case "onblur":case "oncellchange":case "onclick":case "ondblClick":case "ondrag":case "ondragend":case "ondragenter":case "ondragleave":case "ondragover":case "ondrop":case "onfinish":case "onfocus":case "onhelp":case "onmousedown":case "onmouseup":case "onmouseover":case "onmousemove":case "onmouseout":case "onkeypress":case "onkeydown":case "onkeyup":case "onload":case "onlosecapture":case "onpropertychange":case "onreadystatechange":case "onrowsdelete":case "onrowenter":case "onrowexit":case "onrowsinserted":case "onstart":case "onscroll":case "onbeforeeditfocus":case "onactivate":case "onbeforedeactivate":case "ondeactivate":case "type":l.embedAttrs["type"]=i;break;case "codebase":l.objAttrs["codebase"]=i;break;case "width":l.objAttrs["width"]=i;l.embedAttrs["width"]=i;break;case "height":l.objAttrs["height"]=i;l.embedAttrs["height"]=i;break;case "align":l.objAttrs["align"]=i;l.embedAttrs["align"]=i;break;case "vspace":l.objAttrs["vspace"]=i;l.embedAttrs["vspace"]=i;break;case "hspace":l.objAttrs["hspace"]=i;l.embedAttrs["hspace"]=i;break;case "class":l.objAttrs["class"]=i;l.embedAttrs["class"]=i;break;case "title":l.objAttrs["title"]=i;break;case "accesskey":l.objAttrs["accesskey"]=i;break;case "name":l.objAttrs["name"]=i;l.embedAttrs["name"]=i;break;case "id":l.objAttrs["id"]=i;l.embedAttrs["name"]=i;break;case "tabindex":l.objAttrs["tabindex"]=i;break;default:l.params[I]=l.embedAttrs[I]=i}},forGetAttribute:function(i){var I=this;i=i.toLowerCase();if(I.objAttrs[i]!=undefined){return I.objAttrs[i]}else if(I.embedAttrs[i]!=undefined){return I.embedAttrs[i]}else if(I.embedAttrs!=undefined){return I.embedAttrs[i]}else{return null}},setAttribute:function(I,i){this.forSetAttribute(I,i)},getAttribute:function(i){return this.forGetAttribute(i)},addVariable:function(I,i){var l=this;if(l.escapeIs){I=escape(I);i=escape(i)}
if(l.flashVarsStr==""){l.flashVarsStr=I+"="+i}else{l.flashVarsStr+="&"+I+"="+i}
l.embedAttrs["FlashVars"]=l.flashVarsStr},getVariable:function(I){var o=this,i=o.flashVarsStr;if(o.escapeIs){I=escape(I)}
var l=new RegExp(I+"=([^\\&]*)(\\&?)","i").exec(i);if(o.escapeIs){return unescape(RegExp.$1)}
return RegExp.$1},addParam:function(I,i){this.forSetAttribute(I,i)},getParam:function(){return this.forGetAttribute(name)},write:function(i){var I=this;if(typeof i=="string"){sina.$(i).innerHTML=I.getFlashHtml()}else if(typeof i=="object"){i.innerHTML=I.getFlashHtml()}}}