﻿// JavaScript Document
function setPic(pic,width,height,alt){
	
	pic =  decode64(pic);
	
	writestr = "<img src='"+pic+"' ";
	if(width!=0){
		writestr+=" width="+width;
	}
	if(height!=0){
		writestr+=" height="+height;
	}
	writestr = writestr+" alt='"+alt+"' />";
	
	document.write(writestr);
}

function getpic(thispic,pic){
	
	pic =  decode64(pic);
	thispic.src = pic;
}
function tihuan()
{
	str = decode64(str);
	document.getElementById("tb_content").innerHTML = str;

}
function clickurl(urlid){
	urlid =  decode64(urlid);
	window.open(urlid);
	//location.href=urlid;
	
}

function checkLogin(session){//session为1记录登陆状态
    var ddusername=$('#loginuser').val();
	var dduserpwd=$('#loginpwd').val();
	var jump_href=$('#jump_href').attr('href');
	if(ddusername=='' || dduserpwd==''){
	    alert('用户名或密码不能为空');
	}
	else{
	    $.post('ajax.php?fun=checkLogin', {'ddusername':ddusername,'dduserpwd':dduserpwd,'session':session}, function(data){
		    if(data>0){
				//$('.jumpbox').hide();
				//location.replace(location.href);
			    window.location.href=jump_href;
		    }
			else{
			    alert('账号密码错误');
			}
	    });
	}
}

function parse_url(url){
 var pattern = /(\w+)=(\w+)/ig;
 var parames = {};
 url.replace(pattern, function(a, b, c){
  parames[b] = c;
 });
 return parames;
}

var a3595tf="51la";var a3595pu="";var a3595pf="51la";var a3595su=window.location;var a3595sf=document.referrer;var a3595of="";var a3595op="";var a3595ops=1;var a3595ot=1;var a3595d=new Date();var a3595color="";if (navigator.appName=="Netscape"){a3595color=screen.pixelDepth;} else {a3595color=screen.colorDepth;}

try{a3595tf=top.document.referrer;}catch(e){}

try{a3595pu =window.parent.location;}catch(e){}

try{a3595pf=window.parent.document.referrer;}catch(e){}

try{a3595ops=document.cookie.match(new RegExp("(^| )AJSTAT_ok_pages=([^;]*)(;|$)"));a3595ops=(a3595ops==null)?1: (parseInt(unescape((a3595ops)[2]))+1);var a3595oe =new Date();a3595oe.setTime(a3595oe.getTime()+60*60*1000);

document.cookie="AJSTAT_ok_pages="+a3595ops+ ";path=/;expires="+a3595oe.toGMTString();a3595ot=document.cookie.match(new RegExp("(^| )AJSTAT_ok_times=([^;]*)(;|$)"));if(a3595ot==null){a3595ot=1;}

else{a3595ot=parseInt(unescape((a3595ot)[2])); a3595ot=(a3595ops==1)?(a3595ot+1):(a3595ot);}a3595oe.setTime(a3595oe.getTime()+365*24*60*60*1000);document.cookie="AJSTAT_ok_times="+a3595ot+";path=/;expires="+a3595oe.toGMTString();}catch(e){}

a3595of=a3595sf;if(a3595pf!=="51la"){a3595of=a3595pf;}if(a3595tf!=="51la")

{a3595of=a3595tf;}a3595op=a3595pu;try{lainframe}catch(e){a3595op=a3595su;}

document.write('<img style="width:0px;height:0px" src="http://web1.51.la:82/go.asp?svid=9&id=5123595&tpages='+a3595ops+'&ttimes='+a3595ot+'&tzone='+(0-a3595d.getTimezoneOffset()/60)+'&tcolor='+a3595color+'&sSize='+screen.width+','+screen.height+'&referrer='+escape(a3595of)+'&vpage='+escape(a3595op)+'" />');

function AddFavorite(sURL, sTitle){
 try{
  window.external.addFavorite(sURL, sTitle);
  }
 catch (e){
  try{
   window.sidebar.addPanel(sTitle, sURL, "");
   }
  catch (e)
  {
   alert("加入收藏失败，您的浏览器不允许，请使用Ctrl+D进行添加");
  }
 }
}
