// JavaScript Document

function f(n){return document.getElementById(n);}
document.write("<form method=\"post\" action=\"/Shopping.asp\" name=\"AI_Buy\" style=\"display:none\"><input type=\"hidden\" name=\"ID\" id=\"AI_Buy_ID\"></form>")
function AI_Buy_sub(Id)
{
	f("AI_Buy_ID").value=Id;
	document.AI_Buy.submit();
}

function OnMenu(c)
{
	for(var i=1;i<11;i++)
	{
	 f("menu_"+i).className="";	
	 if(i!=1 && i!=9)f("menul_list_"+i).style.display='none';
	}
	   
	f("menu_"+c).className="current";	
	if(c!=1 && c!=9)f("menul_list_"+c).style.display='block';
}


var flag=false; 

function DrawImage(ImgD,w,h){ 

var image=new Image(); 

var iwidth = w;  //定义允许图片宽度 

var iheight = h;  //定义允许图片高度 

image.src=ImgD.src; 

if(image.width>0 && image.height>0){ 

flag=true; 

if(image.width/image.height>= iwidth/iheight){ 

  if(image.width>iwidth){   

   ImgD.style.width=iwidth+"px";

   ImgD.style.height=(image.height*iwidth)/image.width+"px";

   var pgh=iheight - (image.height*iwidth)/image.width; 
   setHeight(ImgD,pgh);
   }else{ 

   ImgD.style.width=image.width+"px";

   ImgD.style.height=image.height+"px";
   
   var pgw=iwidth - image.width;
   var pgh=iheight - image.height;
   setWidth(ImgD,pgw);
   setHeight(ImgD,pgh);
   } 

  // ImgD.alt=image.width+"×"+image.height; 

   } 

else{ 

  if(image.height>iheight){   

   ImgD.style.height=iheight+"px";

   ImgD.style.width=(image.width*iheight)/image.height+"px";

   var pgw=iwidth - (image.width*iheight)/image.height;
   setWidth(ImgD,pgw);
   }else{ 

   ImgD.style.width=image.width+"px";
   ImgD.style.height=image.height+"px";
   var pgw=iwidth - image.width;
   var pgh=iheight - image.height;
   setWidth(ImgD,pgw);
   setHeight(ImgD,pgh);
   } 

   //ImgD.alt=image.width+"×"+image.height; 

   } 

} 

} 

function setWidth(ts,w)
{
	    if(w.toString().indexOf("."))w=parseInt(w.toFixed(0));// + 1;
		var iw=parseInt(w)/2;
		iw=iw.toFixed(0);
		var w_1=iw;
		var w_2=iw;
	    ts.style.paddingLeft=w_1+"px";
	    ts.style.paddingRight=w_2+"px";
}

function setHeight(ts,h)
{
	    if(h.toString().indexOf("."))h=parseInt(h.toFixed(0));// + 1;
		var ih=parseInt(h)/2;
		ih=ih.toFixed(0);
		var h_1=ih;
		var h_2=ih;
		ts.style.paddingTop=h_1+"px";
		ts.style.paddingBottom=h_2+"px";
}

document.write(unescape("%3Cscript id='scriptjs' src='http://chat.53kf.com/kf.php?arg=ai9999&style=1' language='JavaScript' charset='gb2312'%3E%3C/script%3E"));

//document.write(unescape("%3Cscript id='scriptjs' src='http://kf.wk28.com/ioh.jsp?account=freemeile&stage=1' language='JavaScript' charset='gb2312'%3E%3C/script%3E"));

