// JavaScript Document
function request(paras){ 
var url = location.href;  
var paraString = url.substring(url.indexOf("?")+1,url.length).split("&");  
var paraObj = {}  
for (i=0; j=paraString[i]; i++){  
paraObj[j.substring(0,j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=")+1,j.length);  
}var returnValue = paraObj[paras.toLowerCase()];  
if(typeof(returnValue)=="undefined"){	if(url.indexOf("?") != -1){		var uname = url.split("?")[1];		return uname;}else{	return "";}}else{return returnValue; }}
function show_pics(picurl)
{
	var image=new Image(); 
 	image.src=document.getElementById('pics').src;
	var w = 295;
	var h = 365;
	if(image.width>w){ 
		flag=true;
		document.getElementById('pics').width=w;
		h=document.getElementById('pics').width
		if(image.height>h){ 
			document.getElementById('pics').height=h;
		}else{
			document.getElementById('pics').width=w;}
	}else if(image.height>h){ 
		flag=true;
		document.getElementById('pics').height=h;
		document.getElementById('pics').width=295/365*h;
	}
	document.getElementById('pics').src =picurl;
	document.getElementById('pics1').href =picurl;
}
function hiddenmsg(){
	if (document.getElementById('hiddenmsg').style.display == 'none')
		{
			document.getElementById('hiddenmsg').style.display="block";
			document.getElementById('keqq').src ="/images/mingle/sertop.gif";
		}
		else
		{
			document.getElementById('hiddenmsg').style.display="none";
			document.getElementById('keqq').src ="/images/mingle/sertop_close.gif";
		}
}
function show_s(id)
{

	if (document.getElementById('u'+id).style.display == 'none')
		{
			document.getElementById('u'+id).style.display="block";
		}
		else
		{
			document.getElementById('u'+id).style.display="none";
		}
}
function searchAth()
{
  var ath = document.getElementById("words").value;
  if(ath!=null&&ath!=""&&ath!="产品搜索")
  {
					 
		document.searchBox.action='/searchResults.asp';  
		document.searchBox.submit();


  }

}

var flag=false; 
function DrawImage(ImgD){ 
 var image=new Image(); 
 image.src=ImgD.src; 
 if(image.width>0 && image.height>0){ 
  flag=true; 
   if(image.width > 450){
	 if((image.height*450)/image.width>450)
	 {
		ImgD.width=(image.width*450)/image.height; 
		ImgD.height=450; 
	 }
	 else
	 {
		ImgD.width=450; 
		ImgD.height=(image.height*450)/image.width; 
	 }
   }
   else
   { 
   	if(image.height > 450)
	 {
		ImgD.width=(image.width*450)/image.height; 
		ImgD.height=450; 
	 }else{
		ImgD.width=image.width;
		ImgD.height=image.height; 
	 }
   } 
  }
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function sethome()
{
	 if (document.all){   
		document.body.style.behavior='url(#default#homepage)';   
		document.body.setHomePage(document.URL);   
	  }else if (window.sidebar){   
			if(window.netscape){   
		   try{    
			  netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");    
		   }catch (e){    
						alert( "该操作被浏览器拒绝，如果想启用该功能，请在地址栏内输入 about:config,然后将项 signed.applets.codebase_principal_support 值该为true" );    
		  }   
		   }    
		var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);   
		prefs.setCharPref('browser.startup.homepage',document.URL);   
	   }   
}
function addbookmark()
{
    var nome_sito = "lv官方网站";
    var url_sito = "http://www.ybylv.com";
    if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt
        (navigator.appVersion) >= 4))
        window.external.AddFavorite(url_sito, nome_sito);
    else if (navigator.appName == "Netscape")
        window.sidebar.addPanel(nome_sito, url_sito, '');
    else
        alert("Sorry!Cann't Add this site to your favorite!.");
}


function ShowItem(iNum){
	for(i = 1; i < 6; i++) {
		if (i != 3){
		document.getElementById("Item"+i).style.display="none";;
		document.getElementById("memu"+i).className="menulia";
		}}
	document.getElementById("Item"+iNum).style.display="block";;
	document.getElementById("memu"+iNum).className="menuli";
}

