﻿<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//检查底部订阅魅力达人志输入框　
  function   funcheckmagmailblur(){
  	var   mail=document.magmail.mailaddress.value;
  	if(mail=="") {
  		document.magmail.mailaddress.value = "输入您的email地址，就可订阅魅力达人杂志..."
 	 }
  }   
  function   funcheckmagmaildown(){
  	document.magmail.mailaddress.value = "";
  }
  
//检查顶部搜索输入框　  
  function   funchecksearchblur(inputObj,strPrompt){
//  	var searchinput=document.searchprod.searchinput.value;
  	if(inputObj.value =="") {
  		inputObj.value = strPrompt;//"输入查询关键字..."
 	 }
  }   
  function   funchecksearchdown(inputObj){
  	inputObj.value = "";
  }
  
//导航条按钮样式变换

	function mainbtshow(num) {
	       for(i=1;i<11;i++) {
		     if(i==num) {
		       document.getElementById('mainbt'+i).className='mainbtbg03'
		   } else {
		       document.getElementById('mainbt'+i).className='mainbtbg01'
		   }
		   }
	}
//	function mainbtover(num) {
//	       for(i=1;i<11;i++) {
//		     if(i==num) {
//		       document.getElementById('mainbt'+i).className='mainbtbg02'
//		   } else {
//		       //document.getElementById('mainbt'+i).className='mainbtbg01'
//		   }
//		   }
//	}
	
	function mainbtover(obj)
	{
        if(obj.className == 'mainbtbg03')
             return;
	   obj.className='mainbtbg02';
	}
//	function mainbtout(num) {
//	       for(i=1;i<11;i++) {
//		     if(i==num) {
//		       document.getElementById('mainbt'+i).className='mainbtbg01'
//		   }
//		   }
//	}
    function mainbtout(obj) 
    {
        if(obj.className == 'mainbtbg03')
             return;
        obj.className = 'mainbtbg01';
    }
	
//商品详细信息切换
function showpord(t){
  if ( t==1 ){
   document.all.prodetail1.className="DisPlay";
   document.all.prodetail2.className="Hidden";
  } else if ( t==2 ){
   document.all.prodetail2.className="DisPlay";
   document.all.prodetail1.className="Hidden";
  }
}

function showalipy(){
	if(document.all.alipayshow.className=="Hidden"){
		document.all.alipayshow.className="DisPlay";
	}else{
		document.all.alipayshow.className="Hidden";
	}
}

function showservice(t){
  if ( t==1 ){
   document.all.serviceqq.className="DisPlay";
  } else if ( t==2 ){
   document.all.serviceqq.className="Hidden";
  }
}

//购物车信息显示关闭
function showshoppingpord(t){
  if ( t==1 ){
   document.all.floatshoppingcart.className="DisPlay";
  } else if ( t==2 ){
   document.all.floatshoppingcart.className="Hidden";
  }
}

//隐藏购物车按钮
function hiddenshopbt(){
	if(location.pathname=="/tool_53001033"||location.pathname=="/tool.aspx?toolcode=53001033"){
		document.getElementById('shopbt').style.display="none";
		document.getElementById('showac').style.display="block";
	}else{
		document.getElementById('shopbt').style.display="block";
	}
		
}


//同一窗口显示激活窗口

function MM_openBrWindow(theURL,winName,features) { //v2.0
  var  showwin=window.open(theURL,winName,features);
  showwin.focus();
  //showwin.print();
}

//<!-设置图片限制大小函数 tuxianghua 2008-05-01 Begin->
function setpicWH(ImgD,w,h){ 
var flag=false; 
var image=new Image(); 
image.src=ImgD.src; 
if(image.width>0 && image.height>0){ 
flag=true; 
if(image.width/image.height>= w/h){ 
if(image.width>w){  
ImgD.width=w; 
ImgD.height=(image.height*w)/image.width; 
ImgD.style.display="block";
}else{ 
ImgD.width=image.width;  
ImgD.height=image.height; 
ImgD.style.display="block";
} 
} 
else{ 
if(image.height>h){  
ImgD.height=h; 
ImgD.width=(image.width*h)/image.height; 
ImgD.style.display="block"; 
}else{ 
ImgD.width=image.width;  
ImgD.height=image.height; 
ImgD.style.display="block";
} 
} 
}
ImgD.style.width = ImgD.width;
ImgD.style.height = ImgD.height;
}  
//<!-设置图片限制大小函数 tuxianghua 2008-05-01 End->

function alertswf(){
	var boxw=630;
	var boxh=530;
	var boxdivs = document.getElementById("boxdiv1");
	boxdivs.style.top=parseInt(document.body.scrollTop)+parseInt((document.body.offsetHeight-boxh)/2);
	boxdivs.style.left=parseInt((document.body.scrollWidth-boxw)/2);
	boxdivs.style.width=boxw;
  	boxdivs.style.height=boxh;
}
function closeswf(){
	document.getElementById("fade").style.display="none";
	document.getElementById("boxdiv1").style.display="none";
}
function boxstation(){
	document.getElementById("boxdiv1").style.width=279;
	document.getElementById("boxdiv1").style.height=283;
	document.getElementById("boxdiv1").style.left = (document.body.scrollWidth-880)/2+200+Math.random()*300;
	document.getElementById("boxdiv1").style.top = 200+((document.body.scrollHeight-200)/100)*Math.random();
	document.getElementById("fade").style.display="block";
	document.getElementById("fade").style.width = document.body.scrollWidth;
	document.getElementById("fade").style.height = document.body.scrollHeight;
}
