// hexa_array
var HEXA = new Array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');

// dec 2 hex
function hex(input) {
	if (input < 0) return "00";
	else if (input > 255) return "FF";
	else return "" + HEXA[Math.floor(input/16)] + HEXA[input%16];
}

function dec2hex(strin) {
	var i;
	var strout;
	strout = '';

	for(i=0;i<strin.length;i++) {
		strout = strout + hex(strin.charCodeAt(i));
	}

	return strout;
}

function replaceChar(inStr) 
{
	var outStr;
	if(inStr == "壯") outStr = "灯";
	return outStr;
}

// 宏扼快历 滚傈 馆券
function IE_Ver() {
	if(navigator.appName.match(/Explorer/i)) return navigator.appVersion.match(/MSIE \d+.\d+/)[0].split(" ")[1];
	else return 0;
}

// 货芒凯扁
function winopen(file,winname,width,height,scroll,resize) {
	var IE = document.all ? true:false;

	var vtop  = (screen.height - height) / 2;
    var vleft = (screen.width - width) / 2;

	var openOpt = "toolbar=no,channelmode=no,location=no,directories=no";
	openOpt += ",resizable=" + resize + ",menubar=no,scrollbars=" + scroll;
	openOpt += ",width=" + width + ",height=" + height + ",left=" + vleft + ",top=" + vtop;

	if(IE && IE_Ver() >= 5.5) {
		var aa = window.open(file,winname,openOpt);
		aa.focus();
	} else {
		window.open(file,winname,openOpt);
	}
}

//赣聪俊 霓付 钎矫
function addComma(strin) { 
	var strMoney = '' + strin; 
	var rxSplit = new RegExp('([0-9])([0-9][0-9][0-9][,.])'); 
	var array_num = strMoney.split('.'); 
	array_num[0] += '.'; 
		
	do { 
		array_num[0] = array_num[0].replace(rxSplit, '$1,$2'); 
	} while(rxSplit.test(array_num[0])); 
		
	if (array_num.length > 1) { 
		return array_num.join(''); 
	} else { 
		return array_num[0].split('.')[0]; 
	} 
} 

//巩磊凯 辨捞 备窍扁(茄臂 2Byte)
function getLength(cStr) {
	var retCode = 0;
	var currentLen = 0;

	for(i=0; i<cStr.length;i++) {
		var retCode = cStr.charCodeAt(i);
		var retChar = cStr.substr(i,1).toUpperCase();

		retCode = parseInt(retCode);

		if((retChar < '0' || retChar > '9') && (retChar < 'A' || retChar > 'Z') && ((retCode > 255) || (retCode < 0))) {
		   currentLen += 2;
		} else {
			currentLen += 1;
		}
	}

	return currentLen;
}

// 傍归力芭(吝埃傍归 葛滴力芭)
function delSpace(str) { 
	var index, len;

	while(true) {
		index = str.indexOf(" ");
		if (index == -1) break;
		len = str.length;
		str = str.substring(0, index) + str.substring((index+1),len);
	}

	return str;
}

// 箭磊涝仿蔼 眉农
function chkDigit(str) {
	if(str == "") {
		return false;
	} else {
		var count=0;

		for (i=0;i<str.length;i++){
			if(str.charAt(i)<'0' || str.charAt(i)>'9') count++
		}

		if(count!=0) {
			return false;
		} else {
			return true;
		}
	}

}

// 芒摧扁
function selfClose() {
	self.close();
}

// 第肺啊扁
function selfBack() {
	history.back();
}

// 辑厚胶 霖厚吝
function NotService(ntype){
	if (ntype==1)
	{
		alert("了价钦聪促.泅犁 辑厚胶 霖厚吝涝聪促.");
		return;
	}
}

//角矫埃 率瘤罐扁,付捞其捞瘤 率瘤佬扁 
function popSlipWriteReOpen(code,prv) {
	winopen("/my/pop/popSlipWriteRe.bob?code="+code+"&prv="+prv,"viewSlip",385,400,"no","no");
}

// 郴 模备 茫扁 扑诀
function popFindFriend() {
	winopen("/my/pop/popFindFriend.bob","friend",389,428,"no","no");
}

// 郴 器牢飘 炼雀
function viewMyPoint() {
	winopen("http://www.okcashbag.com/my/cashup_point.jsp","pointview",275,200,"no","no");
}

// 傍瘤荤亲 炼雀
function openNoticeRead(n) {
	winopen("/cs/pop/announceRead.bob?idx="+n,"Notice",442,522,'no','no');
}

// 率瘤焊郴扁 扑诀1
function openSendMemo(toid) {
  winopen("/myinfo/pop/memoWrite.bob?strID="+toid,"memo",351,280,"no","no");
}

// 率瘤荐脚 扑诀1
function openResendMemo(id,kind) {
	winopen("/myinfo/pop/memoRead.bob?n4Id=" + id + "&strPrv=save",'slipReceive',456,460,'no','no');
}

// 率瘤荐脚 芭例扑诀1
function openRcvMtomNo(uid){
	winopen("/myinfo/pop/mtoMReceiveNo.bob?uid=" + uid,"MtoM",402,250,"no","no");
}
// 率瘤荐脚 荐遏扑诀1
function openRcvMtomYes(id,nRoomIdx,cNickName,cSex){
	winopen('/myinfo/pop/mtoMReceiveYes.bob?nRoomIdx=' + nRoomIdx + '&userid=' + id + '&nin=' + cNickName + '&sex=' + cSex, nRoomIdx ,402,250,"no","no");
}


// 牧刨明 磊技茄 汲疙 扑诀
function openCsDescription(kind) {
	winopen("/cs/pop/description.bob?kind="+kind,"announce",582,620,"no","no");
}

// 酒官鸥讥, OCB 捞侩救郴
function openUseInfo(kind) {
	winopen("/avatar/pop/popUseInfo.bob?kind="+kind,"useInfo",580,706,"no","no");
}

//遏乔 鼻茄捞傈 舅覆 扑诀 其捞瘤
function popLikePiOpen(code) 
{
	winopen("/lockp/pop/mngChange.bob?code="+code,"likePi",421,450,"no","no");
}

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.01
  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 && d.getElementById) x=d.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 GoMenuUrl(cGubun){
	if (cGubun=='D0')   location.href="/game/GG1_smatgo/"
	else if (cGubun=='M0')   location.href="/game/GG2_mmatgo/"
	else if (cGubun=='G0')   location.href="/game/GG3_gmatgo/"
	else if (cGubun=='S0')   location.href="/game/GG4_sutda/"
	else if (cGubun=='R0')   location.href="/game/GG5_dori/"
	else if (cGubun=='L0')   location.href="/game/GG6_lgostop/"
	else if (cGubun=='Y0')   location.href="/game/GG7_ymatgo/"
	else if(cGubun=='Z0')   location.href="/game/GG8_nsmatgo/"
	else if (cGubun=='K0')   location.href="/game/GP1_kpoker/?gameType=1"
	else if (cGubun=='K1')   location.href="/game/GP1_kpoker/?gameType=2"
	else if (cGubun=='N0')   location.href="/game/GP2_spoker/"
	else if (cGubun=='H0')   location.href="/game/GP4_hoola/"
	else if (cGubun=='B0')   location.href="/game/GP5_baduki/"
	else if (cGubun=='BB')   location.href="/game/GB1_baduk/"
	else if (cGubun=='JB')   location.href="/game/GB2_janggi/"
	else if (cGubun=='OB')   location.href="/game/GB3_omok/"
	else if (cGubun=='TB')   location.href="/game/GB4_othello/"
	else if (cGubun=='SC')   location.href="/game/GC1_shoot/"
	else if (cGubun=='FC')   location.href="/game/GC2_sacheon/"
	else if (cGubun=='BC')   location.href="/game/GC3_bingo/"
	else if (cGubun=='CC')   location.href="/game/GC4_cross/"
   else{
     alert(cGubun+'   Not ready');
   }
}

// IE 6.0 汲拌 函版俊 蝶弗 敲贰浆 龋免
function embed(flash,w,h,mode,color){
var flashview = '';
flashview += '<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+'">';
flashview += '<param name="allowScriptAccess" value="sameDomain" />';
flashview += '<param name=movie value="'+flash+'">';
flashview += '<param name=quality value=high>';
//flashview += '<param name="bgcolor" value="'+color+'" />';
if (mode=="y")
{
	flashview += '<param name="wmode" value="transparent">';
}
flashview += '<embed src="'+flash+'" align=middle menu="false" quality=high  align=middle pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'" wmode=transparent></embed>';
flashview += '</object>';
document.write(flashview);
}

// 肺弊酒眶
function goLogout() {

  location.href = "/member/logoutProc.bob";


}

// 肺弊牢 其捞瘤肺 捞悼(肺弊牢汽阑 烹茄 肺弊牢)
function viewLogin() {
    var vrtnUrl = dec2hex(location.href);
	alert("肺弊牢 饶 捞侩秦林技夸.");
	location.href = "/index.bob";
   // top.mainFrame.location.href= "/member/login.bob?rtnUrl=" + vrtnUrl;
}

// 肺弊牢汽阑 烹茄 肺弊牢
function goLogin(bobCom) {
	saveid(document.frmLogin);
	with(document.frmLogin) {
		if(delSpace(comid.value).length < 1 || comid.value == "ID(酒捞叼)") {
			alert("酒捞叼甫 涝仿秦 林技夸.");
			comid.value = "";
			comid.focus();
			return false;
		}else if(delSpace(pwd.value).length < 1) {
			alert("厚剐锅龋甫 涝仿秦 林技夸.");
			pwd.value = "";
			pwd.focus();
			return false;
		}else if(comid.value.indexOf(" ") >= 0 || comid.value.indexOf("'") >=0) {
			alert("倾侩窍瘤 臼绰 巩磊啊 涝仿登菌嚼聪促.");
			comid.focus();
			return false;
		}else if(pwd.value.indexOf(" ") >= 0 || pwd.value.indexOf("'") >=0) {
			alert("倾侩窍瘤 臼绰 巩磊啊 涝仿登菌嚼聪促.");
			pwd.value = "";
			pwd.focus();
			return false;
		}else {
			target = "ifr";
			action="https://www.bobpul.com/member/ifr/loginProc_ssl.bob";
		}
	}
}

function saveid(form) {
  var expdate = new Date();
  // 扁夯利栏肺 30老悼救 扁撅窍霸 窃. 老荐甫 炼例窍妨搁 * 30俊辑 箭磊甫 炼例窍搁 凳
  if (form.chkid.checked)
    expdate.setTime(expdate.getTime() + 1000 * 3600 * 24 * 365); 
  else
    expdate.setTime(expdate.getTime() - 1); // 捻虐 昏力炼扒

  setIdCookie("saveid", form.comid.value, expdate);
}

//酒捞叼 涝仿芒 归弊扼款靛
function changeTabId(){
	 if(document.getElementById("id").value == ""){
	 obj = document.getElementById("id").style;
	 obj.backgroundImage = "url(/img_bob/main_3/id_img.gif)";
	 obj.backgroundRepeat = "no-repeat";
	 obj.backgroundPosition = "5px 2px";
	}
}
//厚剐锅龋 涝仿芒 归弊扼款靛
function changeTabPw(){
	if(document.getElementById("pass").value == ""){
	 obj = document.getElementById("pass").style;
	 obj.backgroundImage = "url(/img_bob/main_3/pass.gif)";
	 obj.backgroundRepeat = "no-repeat";
	 obj.backgroundPosition = "5px 2px";
	}
}

//肺弊牢 咆胶飘 冠胶救 臂磊 贸府
function ch (valuecomid) {
if(valuecomid ==  'comid')
	document.frmLogin.comid.style.backgroundImage="";
else
	document.frmLogin.pwd.style.backgroundImage="";

}

// 器目胶啊 牢遣 冠胶甫 哈绢车阑锭 硅版捞固瘤 混府扁 (涝仿蔼捞 乐栏搁 混府瘤 臼扁)
function chout (valuecomid) {
if(valuecomid ==  'comid') {
	if(!document.frmLogin.comid.value) document.frmLogin.comid.style.backgroundImage="url(/img_bob/main_3/login_id.gif)";
}
else {
	if(!document.frmLogin.pwd.value) document.frmLogin.pwd.style.backgroundImage="url(/img_bob/main_3/login_pass.gif)";
}

}
//肺弊牢 咆胶飘 冠胶救 臂磊 贸府 肯丰

function logInput(a) {
	if (a.defaultValue==a.value)
	a.value = ""
}

// 逛钱 雀盔 酒捞叼/厚剐锅龋 茫扁
function findId() {
	winopen('/member/pop/findIdForm.bob','findInfo',420, 450,"no","no");
}

function setIdCookie (name, value, expires) {
  document.cookie = name + "=" + escape (value) + "; path=/; expires=" + expires.toGMTString();
}

function getSaveId(Name) {
  var search = Name + "="
  if (document.cookie.length > 0) { // 捻虐啊 汲沥登绢 乐促搁
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // 捻虐啊 粮犁窍搁
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset)
      // 捻虐 蔼狼 付瘤阜 困摹 牢郸胶 锅龋 汲沥
      if (end == -1)
        end = document.cookie.length
      return unescape(document.cookie.substring(offset, end))
    }
  }
  return "";
}

function keyLoginCheck(bobCom) {
	if(event.keyCode == 13) goLogin(bobCom);
}

function keyCheck(method) {
	if(event.keyCode == 13) eval(method);
}

function downFile(fn) {
	parent.location.href = '/inc/dataDown.bob?fn=' + fn;
}

//眉农冠胶 眉农
function isSelect(frm) {
	with(frm) {
		var rtnBool = false;

		if(typeof(idx.length) == "undefined") {
			if(idx.checked) rtnBool = true;
		} else {
			for(var i=0;i<idx.length;i++) {
				if(idx[i].checked) rtnBool = true;
			}
		}
	}
	return rtnBool;
}

//******************************* S: 某浆 面傈 胶农赋飘 *********************************************
//某浆面傈
function openCashFill() {
  winopen('/wallet/pop/cashFill.bob','cashFill','400','600','no','no');
}

//盲澄荤 搬力窜栏肺 某浆面傈捞 捞风绢 龙锭
function openChnCashFill() {
  //winopen('http://www.gamelamp.com/cont/mylamp/myCash.html','cashFill','425','600','no','no');
  GL.Pay.cashPop();
}
//******************************* E: 某浆 面傈 胶农赋飘 *********************************************
 
//某浆急拱
function openCashGift() {
	winopen('/shop/pop/cashGift.bob','cashgift',562,678);
}
//赣聪 背券
function bobpulChange() {
  winopen('/my/pop/bobpulChange.bob','bobpul','400','520','no','no');
}

//酒捞袍 惑技焊扁
function itemDetail() {
  //winopen('/my/pop/bobpulChange.bob','bobpul','400','520','no','no');
}

//SMS
function openSms(uid)
{
	if (uid == "")
	{
		alert("肺弊牢饶 捞夸秦林技夸");
	}
	else
		winopen('/sms/pop/smsForm.bob','atten',746,553,'no','no');
}

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 moveGo1() {
	with(document.frmInfo) {
		if(delSpace(pwd.value).length < 1) {
			alert('厚剐锅龋阑 涝仿秦 林技夸.');
			pwd.value = '';
			pwd.focus();
		}else {
			target = 'ifr';
			action = '/myinfo/ifr/infoConfirmProc1.bob';
			submit();
		}
	}
}
function moveGo2() {
	with(document.frmInfo) {
		if(delSpace(strName.value).length < 1) {
			alert('捞抚阑 涝仿秦 林技夸.');
			strName.value = '';
			strName.focus();
		}else if(delSpace(n4Jno1.value).length < 1) {
			alert('林刮锅龋 菊磊府甫 涝仿秦 林技夸.');
			n4Jno1.value = '';
			n4Jno1.focus();
		}else if(delSpace(n4Jno2.value).length < 1) {
			alert('林刮锅龋 缔磊府甫 涝仿秦 林技夸.');
			n4Jno2.value = '';
			n4Jno2.focus();
		}else if(!chkDigit(n4Jno1.value)) {
			alert('林刮锅龋绰 箭磊父 涝仿秦 林技夸.');
			n4Jno1.focus();
		}else if(!chkDigit(n4Jno2.value)) {
			alert('林刮锅龋绰 箭磊父 涝仿秦 林技夸.');
			n4Jno2.focus();
		}else if(n4Jno1.value.length != 6) {
			alert('林刮锅龋甫 犬牢秦 林技夸.');
			n4Jno1.focus();
		}else if(n4Jno2.value.length != 7) {
			alert('林刮锅龋甫 犬牢秦 林技夸.');
			n4Jno2.focus();
		}else {
			target = 'ifr';
//						action = '/my/ifr/infoConfirmProc.bob';
			submit();
		}
	}
}

function go_ipinAuth(ipin_frm)
{
	ipin_frm.target = "ifr";
	ipin_frm.action = "/okname/sample/ipin1.asp";
	ipin_frm.submit();
}

// 皋老 档皋牢 涝仿
function selMail(strIn) {
	with(document.frmInfo) {
		if(strIn == '') {
			strEmail2.value = strIn;
			strEmail2.readOnly = false;
			strEmail2.focus();
		} else {
			strEmail2.value = strIn;
			strEmail2.readOnly = true;
		}
	}
}
// 皋老 牢刘
function openMailConfirm() {
  winopen('/myinfo/pop/mailConfirm1.bob?ordMail='+document.frmInfo.ordMail.value+'&strMail='+document.frmInfo.strEmail1.value+'@'+document.frmInfo.strEmail2.value,'mail',410,275,'no','no');
}

function moveProc() {
	with(document.frmInfo) {

		if(delSpace(strPwd.value).length > 0 &&(calculate_msglen(delSpace(strPwd.value)) < 4 || calculate_msglen(delSpace(strPwd.value)) > 10)) {
			alert('厚剐锅龋绰 4~10磊 捞郴肺 累己秦 林技夸.');
			strPwd.focus();
		}else if(delSpace(strPwd.value).length > 0 && delSpace(strRepwd.value).length < 1){
			alert ('犬牢 厚剐锅龋甫 涝仿秦 林技夸.');	
			strRepwd.focus();
		}else if(delSpace(strRepwd.value).length > 0 && delSpace(strPwd.value).length < 1){
			alert ('厚剐锅龋甫 涝仿秦 林技夸.');	
			strPwd.focus();
		}else if(delSpace(strPwd.value).length > 0 && (delSpace(strRepwd.value)!=delSpace(strPwd.value))){
			alert ('犬牢 厚剐锅龋啊 老摹窍瘤 臼嚼聪促.');	
			strRepwd.focus();
		}else if(delSpace(strAddr.value).length > 0 && delSpace(strZip1.value).length < 1 && delSpace(strZip2.value).length < 1) {
			alert('快祈锅龋 八祸阑 烹窍咯 林家甫 涝仿秦 林技夸.');
			openFindZip();
		}else if(delSpace(strAddr.value).length < 1 && delSpace(strZip1.value).length > 0) {
			alert('快祈锅龋 八祸阑 烹窍咯 林家甫 涝仿秦 林技夸.');
			openFindZip();
/*
		}else if((delSpace(n4Tel1.value).length > 0 || delSpace(n4Tel2.value).length > 0) && (!chkTel(n4Tel1.value) || delSpace(n4Tel1.value).length < 2 ||  delSpace(n4Tel1.value).length > 4)) {
			alert('沥犬茄 傈拳锅龋甫 涝仿秦 林技夸.');
			n4Tel1.focus();
		}else if((delSpace(n4Tel1.value).length > 0 || delSpace(n4Tel2.value).length > 0) && (!chkTel(n4Tel2.value) || delSpace(n4Tel2.value).length < 2 ||  delSpace(n4Tel2.value).length > 4)) {
			alert('沥犬茄 傈拳锅龋甫 涝仿秦 林技夸.');
			n4Tel2.focus();
*/
		}else if((delSpace(n4Mobile1.value).length > 0 || delSpace(n4Mobile2.value).length > 0) && (!chkTel(n4Mobile1.value) || delSpace(n4Mobile1.value).length < 2 ||  delSpace(n4Mobile1.value).length > 4)) {
			alert('沥犬茄 勤靛迄锅龋甫 涝仿秦 林技夸.');
			n4Mobile1.focus();
		}else if((delSpace(n4Mobile1.value).length > 0 || delSpace(n4Mobile2.value).length > 0) && (!chkTel(n4Mobile2.value) || delSpace(n4Mobile2.value).length < 2 ||  delSpace(n4Mobile2.value).length > 4)) {
			alert('沥犬茄 勤靛迄锅龋甫 涝仿秦 林技夸.');
			n4Mobile2.focus();
		}else if(delSpace(strEmail1.value).length > 0 && delSpace(strEmail2.value).length < 1) {
			alert('捞皋老 档皋牢阑 涝仿秦 林技夸.');
			strEmail2.value = '';
			strEmail2.focus();
		}
		/*else if(delSpace(strEmail1.value).length > 0 && strEmail.options[15].selected && (delSpace(strEmail2.value)=='hanmail.net' || delSpace(strEmail2.value)=='daum.net')) {
			alert('促澜皋老阑 力寇茄 皋老 林家甫 涝仿秦 林技夸.');
			strEmail2.value = '';
			strEmail2.focus();
		}
		*/
		else if(delSpace(strEmail1.value).length > 0 && !onlyEmail(delSpace(strEmail1.value)+'@'+delSpace(strEmail2.value))){
			alert ('捞皋老 屈侥捞 肋给 登菌嚼聪促.');	
			strEmail2.focus();
		}/*else if(delSpace(chkMail.value).length == 0 && delSpace(ordMail.value).length > 0 && (delSpace(strEmail1.value)+'@'+delSpace(strEmail2.value) != ordMail.value)){
			alert ('皋老林家啊 函版 登菌嚼聪促.\n\n皋老牢刘阑 秦林技夸.');	
			openMailConfirm();
		}*/
		/*else if(delSpace(chkMail.value).length > 0 && (delSpace(strEmail1.value)+'@'+delSpace(strEmail2.value) != chkMail.value)){
			alert ('牢刘茄 皋老林家客 促辅聪促.\n\n皋老牢刘阑 秦林技夸.');	
			openMailConfirm();
		}*/
		else{
		    target = 'ifr'
			action = '/myinfo/ifr/infoEditProc.bob';
			submit();
		}
	}
}

 function moveOut(){
	var cnt=0;

	with(document.frm){

		for(var i=0;i<4; i++){
			if(strOut[i].checked==true){
				cnt++;
				break;
			}
		}

		if(cnt == 0){
			alert('呕硼 荤蜡甫 急琶秦林技夸.');
		}else if(strOut[3].checked==true && strOutMsg.value==""){
			alert('扁鸥 荤蜡甫 涝仿秦林技夸.');
			strOutMsg.focus();
		}else if(confirm('沥富肺 呕硼 窍矫摆嚼聪鳖?')){
			target="ifr";
			action="/myinfo/ifr/infoOutProc.bob";
			submit();
		}
	}
 }

 function changeDate(d) {
	with(document.chargeListForm) {
		var today = new Date();
		da = (d - 1) * 24 * 60 * 60 * 1000;
		db = today.getTime() - da;
		var newday = new Date(db);

		//坷疵朝楼 汲沥
		toYear 	= today.getYear();
		toMon 	= today.getMonth() + 1;
		toDate 	= today.getDate();

		//八祸且 朝楼 汲沥
		newYear = newday.getYear();
		newMon 	= newday.getMonth() + 1;
		newDate = newday.getDate();

		//八祸 矫累老
		sDate.value = newYear + "-" + newMon + "-" + newDate;
		//八祸辆丰老
		eDate.value	= toYear + "-" + toMon + "-" + toDate;

		//return false;
	}
}

function SubmitButton(val) {
	if (val == '3'){ //急阂墨靛 荤侩郴开
		callFormRead(readOn,'chargeListForm','display','/myinfo/ajax/ppcardDetail.bob')
	}else if (val == '4'){ //酒官鸥惑前鼻 荤侩郴开
		callFormRead(readOn,'chargeListForm','display','/myinfo/ajax/avataDetailList.bob')
	}else{ //某浆 荤侩,面傈 郴开
		callFormRead(readOn,'chargeListForm','display','/myinfo/ajax/cashDetailList.bob')
	}
}
function SubmitButtonCash(data) {
	callRead(data,'display','/myinfo/ajax/cashDetailList.bob')
}
function SubmitButtonPPcard(data) {
	callRead(data,'display','/myinfo/ajax/ppcardDetail.bob')
}
function SubmitButtonAvaCoupon(data) {
	callRead(data,'display','/myinfo/ajax/avataDetailList.bob')
}
		


function SubmitButtonBobpul() {
    callFormRead(readOn,'chargeListForm','display','/myinfo/ajax/bobpulDetailList.bob')
}
function SubmitButtonBobpul2(data) {
    callRead(data,'display','/myinfo/ajax/bobpulDetailList.bob')
}

function moveDel() {

	with(document.chargeListForm) {
		var stat = isSelect(document.chargeListForm);

		if(stat) {
			if(confirm('郴开阑 昏力窍矫摆嚼聪鳖?')) {
  	            target = 'ifr';
				action = "/myinfo/ifr/cashDetailProc.bob";
				submit();
			}
		} else {
			alert("昏力且 某浆 郴开阑 格废俊辑 急琶秦 林技夸.");
			return;
		}
	}
}
function moveDelItem() {
	with(document.frmItem) {
		var stat = isSelect(document.frmItem);

		if(stat) {
			if(confirm('酒捞袍阑 昏力窍矫摆嚼聪鳖?')) {
  	            target = 'ifrProc';
				action = "/myinfo/ifr/itemDelProc.bob";
				submit();
			}
		} else {
			alert("昏力且 酒捞袍阑 格废俊辑 急琶秦 林技夸.");
			return;
		}
	}
}



function allCheck(frm) {

  if(frm.allChk.checked==true){
	if(typeof(frm.idx.length) == "undefined") {
		frm.idx.checked = true;
	} else {
	  for(var i=0;i<frm.idx.length;i++) {
		  frm.idx[i].checked = true;
	  }
	}
  }else{
	if(typeof(frm.idx.length) == "undefined") {
		frm.idx.checked = false;
	} else {
	  for(var i=0;i<frm.idx.length;i++) {
		  frm.idx[i].checked = false;
	  }
	}
  }
}

function goMenu(data){
    callRead(data,'display','/myinfo/ajax/dressRoomList.bob')
}
function goMenuItem(data){
    callRead(data,'display','/myinfo/ajax/itemBoxList.bob')
}

function selGubun() {
	with(document.frmAvata) {
		action = '/my/dressRoom.bob';
		submit();
	}
}

function moveAvatarDel() {
	with(document.frmAvata) {
		var stat = isSelect(document.frmAvata);

		if(stat) {
			if(confirm('沥富 昏力窍矫摆嚼聪鳖?')) {
				mode.value = 'del';
				target = 'ifr';
				action = '/myinfo/ifr/dressRoomProc.bob';
				submit();
			}
		} else {
			alert('昏力且 酒官鸥甫 格废俊辑 急琶秦 林技夸.');
			return;
		}
	}
}

function openResell(idx) {
  winopen('/myinfo/pop/avaResell.bob?idx='+idx,'avaResell','420','315','no','no');
}

function openGiftMy(idx) {
  winopen('/myinfo/pop/avaGiftSend.bob?idx='+idx,'avaSend','420','485','no','no');
}

function avaMoveDel() {
	with(document.frmAvata) {
		var stat = isSelect(document.frmAvata);

		if(stat) {
			if(confirm('酒官鸥甫 昏力窍矫摆嚼聪鳖?')) {
  	            target = 'ifrProc';
				action = "/my/ifr/avaGiftDelProc.bob";
				submit();
			}
		} else {
			alert("昏力且 酒官鸥甫 格废俊辑 急琶秦 林技夸.");
			return;
		}
	}
}
/*
function allCheck(frm) {

	if(typeof(frm.length) == "undefined") {
		frm.checked = true;
	} else {
	  for(var i=0;i<frm.length;i++) {
		  frm[i].checked = true;
	  }
	}
}*/

function moveAlbumDel() {
	with(document.frmAvata) {
	  var stat = isSelect(document.frmAvata);
		if(stat) {
			if(confirm('秦寸 举裹阑 昏力窍矫摆嚼聪鳖?')) {
			  action = '/my/ifr/avaAlbumProc.bob';
			  target = 'ifrProc';
			  submit();
			}
		} else {
			alert("昏力且 举裹阑 格废俊辑 急琶秦 林技夸.");
			return;
		}
	}
}

function moveContestJoin(n) {
	var f=document.frmAvata;
	f.aIdx.value = n;
	f.action = '/shop/prideJoin.bob';
	f.submit();
}

function oldAvaBosang(){
  ifrProc.location.href="/my/ifr/oldAvaBosangProc.bob";
}

function itemResll(idx) {
  winopen('/myinfo/pop/itemResell.bob?idx='+idx,'itemResell','420','280','no','no');
}
function goItemUse(id,incGame){
  winopen("/myinfo/pop/gameItemUse.bob?n4ItemId="+id+"&incGame="+incGame,"gameitem",426,310,"no","no")
}

function bobpulmoveDel() {
	with(document.chargeListForm) {
		var stat = isSelect(document.chargeListForm);

		if(stat) {
			if(confirm('逛钱 郴开阑 昏力窍矫摆嚼聪鳖?')) {
				target = 'ifr';
				action = "/myinfo/ifr/bobpulDetailProc.bob";
				submit();
			}
		} else {
			alert("昏力且 逛钱 郴开阑 格废俊辑 急琶秦 林技夸.");
			return;
		}
	}
}

function sendList(a){
  document.chargeListForm.mode.value = "";
  document.chargeListForm.n4Page.value = a;


  callFormRead(readOn,"chargeListForm",'display','/myinfo/ajax/memoSendList.bob');
}
function saveList(a){
  document.chargeListForm.mode.value = "";
  document.chargeListForm.n4Page.value = a;
  callFormRead(readOn,"chargeListForm",'display','/myinfo/ajax/memoSaveList.bob');
}
function keepList(a){
  document.chargeListForm.mode.value = "";
  document.chargeListForm.n4Page.value = a;
  callFormRead(readOn,"chargeListForm",'display','/myinfo/ajax/memoKeepList.bob');
}

function memoKeep() {
	with(document.chargeListForm) {
		var stat = isSelect(document.chargeListForm);

	 	if(stat) {
			if(confirm('急琶茄 率瘤甫 焊包窍矫摆嚼聪鳖?')) {
				target = 'ifr';
				mode.value = "3";
				action = "/myinfo/ifr/memoSaveProc.bob";
				submit();
			}
		} else {
			alert('焊包且 率瘤甫 急琶秦林技夸.');
		}
	}
}

function memoDel() {
	with(document.chargeListForm) {
		var stat = isSelect(document.chargeListForm);

	 	if(stat) {
			if(confirm('急琶茄 率瘤甫 昏力窍矫摆嚼聪鳖?')) {
				target = 'ifr';
				mode.value = "4";
				action = "/myinfo/ifr/memoSaveProc.bob";
				submit();
			}
		} else {
			alert('昏力且 率瘤甫 急琶秦林技夸.');
		}
	}
}
function sendMemoDel() {
	with(document.chargeListForm) {
		var stat = isSelect(document.chargeListForm);

	 	if(stat) {
			if(confirm('急琶茄 率瘤甫 昏力窍矫摆嚼聪鳖?')) {
				target = 'ifr';
				mode.value = "4";
				action = "/myinfo/ifr/memoSendProc.bob";
				submit();
			}
		} else {
			alert('昏力且 率瘤甫 急琶秦林技夸.');
		}
	}
}

function keepMemoDel() {
	with(document.chargeListForm) {
		var stat = isSelect(document.chargeListForm);

	 	if(stat) {
			if(confirm('急琶茄 率瘤甫 昏力窍矫摆嚼聪鳖?')) {
				target = 'ifr';
				mode.value = "4";
				action = "/myinfo/ifr/memoKeepProc.bob";
				submit();
			}
		} else {
			alert('昏力且 率瘤甫 急琶秦林技夸.');
		}
	}
}


function memoSingo() {
	with(document.chargeListForm) {
		var stat = isSelect(document.chargeListForm);

	 	if(stat) {
			if(confirm('急琶茄 率瘤甫 脚绊窍矫摆嚼聪鳖?')) {
				target = 'ifr';
				mode.value = "2";
				action = "/myinfo/ifr/memoSaveProc.bob";
				submit();
			}
		} else {
			alert('脚绊 且 率瘤甫 急琶秦林技夸.');
		}
	}
}

function keepMemoSingo() {
	with(document.chargeListForm) {
		var stat = isSelect(document.chargeListForm);

	 	if(stat) {
			if(confirm('急琶茄 率瘤甫 脚绊窍矫摆嚼聪鳖?')) {
				target = 'ifr';
				mode.value = "2";
				action = "/myinfo/ifr/memoKeepProc.bob";
				submit();
			}
		} else {
			alert('脚绊 且 率瘤甫 急琶秦林技夸.');
		}
	}
}

/*
function goSend(){
  winopen("/myinfo/pop/memoWrite.bob","memo",351,280,"no","no");
}
*/
function goRead(n4Id){
  winopen("/myinfo/pop/memoRead.bob?n4Id="+n4Id+"&strPrv=save","memo",392,375,"no","no");
}
function goOldRead(n4Id){
  winopen("/myinfo/pop/oldMemoRead.bob?n4Id="+n4Id+"&strPrv=save","memo",392,295,"no","no");
}

function goReadKeep(n4Id){
  winopen("/myinfo/pop/memoRead.bob?n4Id="+n4Id+"&strPrv=keep","memo",392,375,"no","no");
}

// 老措老盲泼 夸没 扑诀1
function openMtoM(uid) {
	winopen("/myinfo/pop/mtoMRequest.bob?uid=" + uid,"MtoM",402,375,"no","no");
}


function goAlram(){
  with(document.chargeListForm) {
    mode.value = "1";
    target ="ifr";
	action="/myinfo/ifr/memoKeepProc.bob";
    submit();
  }
}

function keyval(){
	var f = document.frm;
	k_value = event.keyCode;

	if (k_value == 13 && delSpace(f.strMemo.value).length < 1)
	{
		alert("牢荤富阑 巢败林脚 饶 糠狼 滚瓢阑 喘矾林技夸~^^");
		return false;
	}
	else if (k_value == 13)
	{
		alert("糠狼 滚瓢阑 喘矾林技夸~^^");
		return false;
	}
}
function attend(data){
    callRead(data,'display','/myinfo/ajax/attendList.bob');
}
function goAttend(){
  var f = document.frm;
  if (delSpace(f.strMemo.value).length < 1){
    alert("牢荤富阑 巢败林技夸.");
	f.strMemo.focus();
	return false;
  }else{
	f.target="ifr";
	f.action="/myinfo/ifr/attendProc.bob";
	f.submit();
	f.strMemo.value = "";
  }
}

function search() {
    with(document.frmSearch){
	  	var str = delSpace(strSchWord.value);

		if(strSchType[0].selected) {
			if(delSpace(str).length < 1) {
				alert('模备 葱匙烙阑 涝仿秦林技夸.');
				return false;
			}else{
			  action="/index.bob?HighPageCode=SUB&LowPageCode=MYINFO&PageCode=Friend&mode=1";
			  submit();
			}
		} else {
			if(delSpace(str).length < 1) {
				alert('模备 措拳疙阑 涝仿秦林技夸.');
				return false;
			}else{
			  action="/index.bob?HighPageCode=SUB&LowPageCode=MYINFO&PageCode=Friend";
			  submit();
			}
		}
	}
}


function findList(data){
    callRead(data,'display','/myinfo/ajax/friendFindList.bob')
}

function myFriend(data){
    callRead(data,'display','/myinfo/ajax/friendMyList.bob')
}

function yourFriend(data){
    callRead(data,'display','/myinfo/ajax/friendYourList.bob')
}

function myBadFriend(data){
    callRead(data,'display','/myinfo/ajax/friendBadList.bob')
}

function friendInfo(u){
    winopen('/myinfo/pop/friendInfo.bob?strUserid='+u,'friendInfo',395,175,'no','no')
}
function myReCommenderList(data){
    callRead(data,'display','/myinfo/ajax/FriendRecommenderList.bob')
}
function myReCommenderActList(data){
    callRead(data,'display','/myinfo/ajax/FriendRecommenderActList.bob')
}
function friendDel(){
  var stat = isSelect(document.frm);
  if(stat) {
    with(document.frm) {
	  if(confirm('沥富 昏力 窍矫摆嚼聪鳖?')) {
		  target = 'ifrProc';
		  action = '/myinfo/ifr/friendProc.bob';
		  submit();
	  }
	}
  }else{
	alert("昏力且 模备甫 格废俊辑 急琶秦 林技夸.");
	return;
  }
}
function RecommendAdd(){
  with(document.frmRecommend) {
	  if(confirm('沥富 殿废 窍矫摆嚼聪鳖?')) {
		  target = 'ifrProc';
		  action = '/myinfo/ifr/RecommendAddProc.bob';
		  submit();
	  }
	}

}
function RecommendActAdd(){
  with(document.frmRecommend) {
          document.frmRecommend.action="/myinfo/friendList.bob"
		  submit();
	}

}

function gofriend(u,m, uid) {
	with(document.frm) {
	  if (u==uid){
	    alert('磊脚阑 模备殿废窍芭唱 唱慧模备肺 殿废且 荐 绝嚼聪促.');
	  }else{
		if(confirm('殿废窍矫摆嚼聪鳖?')) {
			mode.value = m;
			strFid.value = u;
			target = 'ifr';
			action = '/myinfo/ifr/friendProc.bob';
			submit();
		}
	  }
	}
}

function gamoneyZero(g){
	winopen('/myinfo/pop/gameMoneyZero.bob?incGame='+g,'zero',300,185);
}


function goBobpulAva(data){
    callRead(data,'display','/bobGuide/ajax/bobpulShopList.bob')
}

function goFreeAva(data){
    callRead(data,'display','/shop/ajax/freeList.bob')
}
function free(){
  winopen("/shop/pop/freeResult.bob","free",421,215,"no","no")
}

function moveJoin() {
	with(document.frmAlzza) {
		var stat = false;
		for(var i=0;i<gamekind.length;i++) {
			if(gamekind[i].checked) stat = true;
		}

		if(!agree.checked) {
			alert('荐欺舅楼雀盔 捞侩距包俊 悼狼窍寂具 钦聪促.');
			agree.focus();
			return;
		}

		else if(!stat) {
			alert('瘤鞭 罐栏角 霸烙赣聪甫 急琶秦 林技夸.');
			gamekind[0].focus();
			return;
		}

		action = '/index.bob?HighPageCode=SUB&LowPageCode=BOBGUIDE&PageCode=SALZZACOST';
		submit();
	}
}
function moveCJoin() {
	with(document.frmAlzza) {
		var stat = false;
		for(var i=0;i<gamekind.length;i++) {
			if(gamekind[i].checked) stat = true;
		}

		if(!agree.checked) {
			alert('舅楼雀盔 捞侩距包俊 悼狼窍寂具 钦聪促.');
			agree.focus();
			return;
		}

		else if(!stat) {
			alert('瘤鞭 罐栏角 霸烙赣聪甫 急琶秦 林技夸.');
			gamekind[0].focus();
			return;
		}
		action = '/index.bob?HighPageCode=SUB&LowPageCode=BOBGUIDE&PageCode=SALZZAECOST';
		submit();
	}
}

function openAddrEdit() {
	winopen('/event/pop/addrEdit.bob','addrEdit',439,600,'no','no');
}


function goWrite()
{
    with(document.frm){
	    if(delSpace(n2Class2.value).length < 1){
		  alert("1瞒盒幅甫 急琶秦林技夸.");
	    }else if(n2Class3.length > 1 &&delSpace(n2Class3.value).length < 1){
		  alert("2瞒盒幅甫 急琶秦林技夸.");
	    }else if(delSpace(strSubject.value).length < 1){
		  alert("力格阑 涝仿秦林技夸.");
		  strSubject.value = '';
		  strSubject.focus();
	    }else if(delSpace(strContent.value).length < 1){
		  alert("郴侩阑 涝仿秦林技夸.");
		  strContent.value = '';
		  strContent.focus();
		}
		else if ( agree.checked == false ){
			alert("俺牢沥焊 荐笼 棺 捞侩俊 悼狼秦林技夸.");
			agree.focus();
			return;
	    }else{
		  target = "ifr"
		  action="/cs/ifr/inquiryProc.bob";
		  submit();
		}
	}
}


function goReWrite()
{
    with(document.frm){
	    if(delSpace(strSubject.value).length < 1){
		  alert("力格阑 涝仿秦林技夸.");
		  strSubject.value = '';
		  strSubject.focus();
	    }else if(delSpace(strContent.value).length < 1){
		  alert("郴侩阑 涝仿秦林技夸.");
		  strContent.value = '';
		  strContent.focus();
	    }else{
		  target = "ifr"
		  action="/cs/ifr/inquiryProc.bob";
		  submit();
		}
	}
}


function detect_pic(pic, size, mode) {
	var w = parseFloat(pic.width);
	var h = parseFloat(pic.height);
	var pct = 0;

	if(w <= size && mode == 'unzoom') {
		window.resizeTo(w + 50,h + 70);
		return;
	} else {
		pct = size / w;
		pic.width = pct * w;
		pic.height = pct * h;
	}
}

function moveGo(a, className){
	if(a=="1"){
		fraMemList1.location ="/cs/ifr/provision01.html";
	}else if(a=="2"){
		fraMemList1.location ="/cs/ifr/provision02.html";
	}else if(a=="3"){
		fraMemList1.location ="/cs/ifr/provision03.html";
	}else if(a=="4"){
		fraMemList1.location ="/cs/ifr/provision04.html";
	}else if(a=="5"){
		fraMemList1.location ="/cs/ifr/provision05.html";
	}

	$('.punishmentStandard a').css('backgroundImage', 'url(/images/cs/bt_tab1.gif)')	;
	$('.punishmentStandard a.'+className).css('backgroundImage', 'url(/images/cs/bt_tab2.gif)') ;
}

function na_show_layer(lname) {
	for(var i=1; i<=10; i++) {
		hthis = 'sub' + i;

		if(typeof(document.all[hthis]) != 'object') {
			continue;
		} else {
			hthis = eval(hthis);
			hthis.style.display	= 'none';
		}
	}

	vthis = 'sub' + lname;

	if(typeof(document.all[vthis]) == 'object') {
		vthis = eval(vthis);
		vthis.style.display	= 'block';
	}
}

function provision(data){
    callRead(data,'display','/cs/ajax/provisionList.bob');
}

function schFind(){
	var f = document.frm;

	if (f.strSch.value==""){
		alert("八祸绢甫 涝仿窍技夸");
		f.strSch.focus();
		return false;
	}else{
		f.action = "/index.bob?HighPageCode=SUB&LowPageCode=CS&PageCode=ANNOUNCE";
		f.submit();
		return true;
	}
}
function announceType(head)
{
	location.href = "/index.bob?HighPageCode=SUB&LowPageCode=CS&PageCode=ANNOUNCE&strHead="+head;
}
  function topSch(str){
//	with(document.frmSch){
//		schWord.value = sch;
//		action="/cs/searchList.bob";
//		submit();
//	}
		if (str != "")
			document.frmSch.schWord.value = str;

		if (document.frmSch.schWord.value == "")
		{
			alert("八祸绢甫 涝仿秦林技夸.");
			document.frmSch.schWord.focus();
		}
		else 
			callFormRead(readOn,"frmSch",'display','/cs/ajax/searchList.bob');

}

function helpCallRead(n4Page, class1, class2, class3, faqId)
{
  callRead("n4Page="+n4Page+"&class1="+class1+"&class2="+class2+"&class3="+class3+"&faqId="+faqId,'display','/cs/ajax/faqList.bob');
}

function gameRank()
{
	var frm = document.frmRank;
	var code = frm.gameKind.value;

	frm.action = "/index.bob?HighPageCode=SUB&LowPageCode=FLASH&PageCode=RANKING";
	frm.submit();
}

function moveCommPage(s) {
	callRead(s,'commentView','/gameFlash/ajax/comment.bob');
	document.frmComment.comment.value = '';
}

function moveGameRankPage(s) {
	callRead(s,'gameRankView','/gameFlash/ajax/gameRank.bob');
}

function commentReg() {
	with(document.frmComment) {
		if(delSpace(comment.value).length < 1) {
			alert('茄付叼甫 涝仿秦 林技夸.');
			comment.focus();
			return;
		} else {
			action = '/gameFlash/ifr/commentProc.bob';
			target = 'ifr';
			submit();
		}
	}
}

function commentDel(i,n) {
	ifr.location.href = '/gameFlash/ifr/commentDelProc.bob?num=' + i + '&idx=' + n;
}

function writeText(s,a) {
	var f = document.frm;

	if (a=='1'){
		f.fileSrc1.value = s;
	}else{
		f.fileSrc2.value = s;
	}
}
