<!--

window["MzBrowser"]={};(
	function()
	{
	if(MzBrowser.platform) return;
	var ua = window.navigator.userAgent;
	MzBrowser.platform = window.navigator.platform;
	
	MzBrowser.firefox = ua.indexOf("Firefox")>0;
	MzBrowser.opera = typeof(window.opera)=="object";
	MzBrowser.ie = !MzBrowser.opera && ua.indexOf("MSIE")>0;
	MzBrowser.mozilla = window.navigator.product == "Gecko";
	MzBrowser.netscape= window.navigator.vendor=="Netscape";
	MzBrowser.safari= ua.indexOf("Safari")>-1;
	
	if(MzBrowser.firefox) var re = /Firefox(\s|\/)(\d+(\.\d+)?)/;
	else if(MzBrowser.ie) var re = /MSIE( )(\d+(\.\d+)?)/;
	else if(MzBrowser.opera) var re = /Opera(\s|\/)(\d+(\.\d+)?)/;
	else if(MzBrowser.netscape) var re = /Netscape(\s|\/)(\d+(\.\d+)?)/;
	else if(MzBrowser.safari) var re = /Version(\/)(\d+(\.\d+)?)/;
	else if(MzBrowser.mozilla) var re = /rv(\:)(\d+(\.\d+)?)/;
	
	if("undefined"!=typeof(re)&&re.test(ua))
	MzBrowser.version = parseFloat(RegExp.$2);
	}
)(); 


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_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_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 Openwin(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function rifr() {
	//if (rightifr.document.body.scrollHeight>400){
		
		document.all['rightifr'].style.height=parseInt(document.body.clientHeight)-220;
		document.all['rightpart'].style.height=parseInt(document.body.clientHeight)-215;
		document.all['leftpart'].style.height=parseInt(document.body.clientHeight)-215;
		document.all['rightp'].style.height=parseInt(document.body.clientHeight)-157;
		
	//}
}
function remenu() {
	document.all['leftmenu'].style.height=leftmenu.document.body.scrollHeight;
} 
function reh() {
	top.document.all['leftmenu'].style.height=document.body.scrollHeight;
	//if(top.document.all['leftmenu'].scrollHeight>=400){top.document.all['rightifr'].style.height=top.document.all['leftmenu'].scrollHeight+250;}else{top.document.all['rightifr'].style.height=400;}
}

function dismenupanda(str,num,lan){

	switch (lan) {
	
	case "cn":
		x_1="15";
		x_2="110";
		x_3="190";
		x_4="260";
		x_5="330";
		x_6="390";
		x_7="465";
		x_8="550";
		break;
		
	case "kr":
		x_1="10";
		x_2="95";
		x_3="175";
		x_4="250";
		x_5="335";
		x_6="420";
		x_7="495";
		x_8="565";
		break;
		
	case "en":
		x_1="10";
		x_2="95";
		x_3="180";
		x_4="260";
		x_5="345";
		x_6="425";
		x_7="500";
		x_8="570";
		break;
	
	default:
		x_1="5";
		x_2="80";
		x_3="180";
		x_4="250";
		x_5="340";
		x_6="420";
		x_7="500";
		x_8="565";
	
	} 



	
	if(str=="menu_guide"){
		top.document.all['yokowidth'].style.left=x_1;
		if(num==1){
			top.document.all['yokopanda'].style.display="block";
		}else{
			top.document.all['yokopanda'].style.display="none";
		}
	}else if(str=="menu_profile"){
		top.document.all['yokowidth'].style.left=x_2;
		if(num==1){
			top.document.all['yokopanda'].style.display="block";
		}else{
			top.document.all['yokopanda'].style.display="none";
		}
	}else if(str=="menu_diary"){
		top.document.all['yokowidth'].style.left=x_3;
		if(num==1){
			top.document.all['yokopanda'].style.display="block";
		}else{
			top.document.all['yokopanda'].style.display="none";
		}
	}else if(str=="menu_gallery"){
		top.document.all['yokowidth'].style.left=x_4;
		if(num==1){
			top.document.all['yokopanda'].style.display="block";
		}else{
			top.document.all['yokopanda'].style.display="none";
		}
	}else if(str=="menu_studio"){
		top.document.all['yokowidth'].style.left=x_5;
		if(num==1){
			top.document.all['yokopanda'].style.display="block";
		}else{
			top.document.all['yokopanda'].style.display="none";
		}
	}else if(str=="menu_photo"){
		top.document.all['yokowidth'].style.left=x_6;
		if(num==1){
			top.document.all['yokopanda'].style.display="block";
		}else{
			top.document.all['yokopanda'].style.display="none";
		}
	}else if(str=="menu_mail"){
		top.document.all['yokowidth'].style.left=x_7;
		if(num==1){
			top.document.all['yokopanda'].style.display="block";
		}else{
			top.document.all['yokopanda'].style.display="none";
		}
	}else if(str=="menu_link"){
		document.all['yokowidth'].style.left=x_8;
		if(num==1){
			top.document.all['yokopanda'].style.display="block";
		}else{
			top.document.all['yokopanda'].style.display="none";
		}
	}else{
		top.document.all['yokowidth'].style.width=x_9;
		if(num==1){
			top.document.all['yokopanda'].style.display="block";
		}else{
			top.document.all['yokopanda'].style.display="none";
		}
	}
	//if(num==1){
	//	top.document.getElementById(str).src="images/"+str+".gif";
	//}else{
	//	top.document.getElementById(str).src="images/spacer.gif";
	//}
}

function QString(qs)
{
    var s = location.href;
    s = s.replace("?","?&").split("&");
    var re = "";
    for(i=1;i<s.length;i++)
        if(s[i].indexOf(qs+"=")==0)
            re = s[i].replace(qs+"=","");
    return re;
}

function setlancookie(a){
	setCookie("lan",a);	
}
function goguide() {
	if(top.document.all['leftmenu'].src!="menu.html?r=top"){
		top.document.all['leftmenu'].src="menu.html?r=top";
	}
}
function goprofile() {
	if(top.document.all['leftmenu'].src!="menu.html?r=profile"){
		top.document.all['leftmenu'].src="menu.html?r=profile";
	}
}
function godiary() {
	if(top.document.all['leftmenu'].src!="menu.html?r=dairy"){
		top.document.all['leftmenu'].src="menu.html?r=dairy";
	}
}
function gogallery() {
	if(top.document.all['leftmenu'].src!="menu.html?r=gallery"){
		top.document.all['leftmenu'].src="menu.html?r=gallery";
	}
}
function gophoto() {
	if(top.document.all['leftmenu'].src!="menu.html?r=photo"){
		top.document.all['leftmenu'].src="menu.html?r=photo";
	}
}
function gomail() {
	if(top.document.all['leftmenu'].src!="menu.html?r=mail"){
		top.document.all['leftmenu'].src="menu.html?r=mail";
	}
}
function gostudio() {
	if(top.document.all['leftmenu'].src!="menu.html?r=studio"){
		top.document.all['leftmenu'].src="menu.html?r=studio";
	}
}
function golink() {
	if(top.document.all['leftmenu'].src!="menu.html?r=link"){
		top.document.all['leftmenu'].src="menu.html?r=link";
	}
}
function makevisible(cur,which){
	if (which==0){
		if(cur.filters.alpha.opacity<100){cur.filters.alpha.opacity=100;	}
	}else{
  		if(cur.filters.alpha.opacity>55){cur.filters.alpha.opacity=55;	}
	}
}

function show(i){     
	if (i.style.display == "none") {     
	  i.style.display = "";     
	 }else{     
	  i.style.display = "none";     
		//top.document.all['rightifr'].style.height=parseInt(top.document.body.clientHeight)-215;
	 }     
}

function hide(j){     
	j.style.display = "none"; 
} 

function randnum(){     
	return (Math.round(Math.random()*36));
} 


function setCookieValue(name,value,days)//name:cookie's name,value:cookies's value
{
	var exp = new Date();    
	exp.setTime(exp.getTime()+(days*24*60*60*1000));
    if (!days) { days=1;}
    document.cookie = name+"="+escape (value)+ ";expires=" + exp.toGMTString()+";path=/";  
}
function setCookie(name,value)
{
	setCookieValue(name,value,1);
}
function getCookie(name)//get the cookies
{
	var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
    if(arr != null) return unescape(arr[2]); return null;

}
function delCookie(name)//delete the cookie
{
	var exp = new Date();
	exp.setTime(exp.getTime() - 1);
	var cval=getCookie(name);
	if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString()+";path=/"; 
}
function closebo()//delete the cookie
{
	document.getElementById('light').style.display='none';
	document.getElementById('fade').style.display='none';
	top.document.getElementById('imgdisplay').src="";
}

function openbo(imgsrc,title,date)
{
	var img1=new Image();     
    img1.src=imgsrc;
	var imgwidth,imgheight;
	imgwidth=img1.width;
	imgheight=img1.height;
	
	top.document.getElementById('imgdisplay').src=imgsrc;
	
	
	top.document.getElementById('fade').style.display='block';
	top.document.getElementById('load').style.display='block';
	top.document.getElementById('load').style.left=(50-parseInt(46/parseInt(top.document.body.clientWidth)*100))+"%";

	
	if (img1.complete){//ie
		top.document.getElementById('load').style.display="none";
		if(MzBrowser.ie){
			top.document.getElementById('light').style.width=imgwidth*1+30;
			top.document.getElementById('displaytop').style.width=imgwidth;
			top.document.getElementById('light').style.height=imgheight*1+40;
		}
		if(MzBrowser.firefox){
			imgwidth=top.document.getElementById('imgdisplay').width;
			imgheight=top.document.getElementById('imgdisplay').height;
			top.document.getElementById('light').style.width=imgwidth;
			top.document.getElementById('displaytop').style.width=imgwidth;
			top.document.getElementById('light').style.height=imgheight*1+40;
		}
		
		var newparsent1,newparsent2;
		newparsent1=50-parseInt(imgwidth/2/parseInt(top.document.body.clientWidth)*100);
		newparsent2=50-parseInt(imgheight/2/parseInt(top.document.body.clientHeight)*100);
		top.document.getElementById('light').style.left=newparsent1+"%";
		top.document.getElementById('light').style.top=newparsent2+"%";
		//top.document.getElementById('imgclose').style.margin='-20 -10 0 '+(imgwidth-20);
		top.document.getElementById('imgtitle').innerHTML="<b><font color='#666666'>"+title+"</font></b><br><font color='#8d8d8d'>"+date+"</font>";
		top.document.getElementById('light').style.display='block';		

		return;
		
	}
	img1.onload=function(){//firefox
		top.document.getElementById('load').style.display="none";
		if(MzBrowser.ie){
			top.document.getElementById('light').style.width=imgwidth*1+30;
			top.document.getElementById('displaytop').style.width=imgwidth;
			top.document.getElementById('light').style.height=imgheight*1+40;
		}
		if(MzBrowser.firefox){
			imgwidth=top.document.getElementById('imgdisplay').width;
			imgheight=top.document.getElementById('imgdisplay').height;
			top.document.getElementById('light').style.width=imgwidth;
			top.document.getElementById('displaytop').style.width=imgwidth;
			top.document.getElementById('light').style.height=imgheight*1+40;
		}
		
		var newparsent1,newparsent2;
		newparsent1=50-parseInt(imgwidth/2/parseInt(top.document.body.clientWidth)*100);
		newparsent2=50-parseInt(imgheight/2/parseInt(top.document.body.clientHeight)*100);
		top.document.getElementById('light').style.left=newparsent1+"%";
		top.document.getElementById('light').style.top=newparsent2+"%";
		//top.document.getElementById('imgclose').style.margin='-20 -10 0 '+(imgwidth-20);
		top.document.getElementById('imgtitle').innerHTML="<b><font color='#666666'>"+title+"</font></b><br><font color='#8d8d8d'>"+date+"</font>";
		top.document.getElementById('light').style.display='block';		
		
	}

}

//-->