function ViewpContent(pid,pgid)
        {
            PopCenter("product.php?act=page&pid="+pid+"&pgid="+pgid,800,600);
        }	

function bookmark(){
window.external.addFavorite('http://www.gzdfzs.com/','VݶSb');
}

function lit_img(ImgD,awidth){
var image=new Image(); 
image.src=ImgD.src;
if(image.width>0 && image.height>0){
	if(image.width>awidth){
		ImgD.width=awidth; 
	    ImgD.height=image.height/image.width*awidth;
	}
}
}

function ShowNow()
{ 
    if(window.document.getElementById("showNow") != null)
    {
        var now=new Date() 
        var myclock="Time: "+now.getYear()+"."+(now.getMonth()+1)+"."+now.getDate()+"  "+ (now.getHours()>12 ? "PM " : "AM ") + now.getHours()+":"+(now.getMinutes()>9 ? "" : "0") + now.getMinutes()+":"+ (now.getSeconds()>9 ? "" : "0") + now.getSeconds();
        if(document.layers)
        {
            document.layers.showNow.document.write(myclock)
            document.layers.showNow.document.close()
        }
        else if(document.all)
        showNow.innerHTML=myclock;
    }
}
function Pop(url,left,top,width,height) {
	window.open(url,"_blank","directories=no,resizable=yes,status=yes,toolbar=no,scrollbars=yes,height="+height+",width="+width+",top="+top+",left="+left);
}
function PopCenter(url,width,height) {
	var maxWidth=window.screen.availWidth-10;
	var maxHeight=window.screen.availHeight-30
	var left=(maxWidth-width)/2;
	var top=(maxHeight-height)/2;
	Pop(url,left,top,width,height);
}

        function ViewContent(nid,npid)
        {
            PopCenter("news.php?act=page&nid="+nid+"&npid="+npid,800,600);
        }
        function ViewCase(cid)
        {
            PopCenter("case.php?act=page&cid="+cid,800,600);
        }
		
        function ViewpContent(pid,pgid)
        {
            PopCenter("product.php?act=page&pid="+pid+"&pgid="+pgid,800,600);
        }		
		
		
		
		var flag=false; 

function DrawImage(ImgD,awidth,aheight){ 

var image=new Image(); 

image.src=ImgD.src; 

if(image.width>0 && image.height>0){ 

  flag=true; 

  if(image.width/image.height>= awidth/aheight){ 

   if(image.width>awidth){

    ImgD.width=awidth; 

    ImgD.height=(image.height*aheight)/image.width; 

   }else{ 

    ImgD.width=image.width;

    ImgD.height=image.height; 

   }

   /*ImgD.alt="bigpic"  */

  } 

  else{ 

   if(image.height>aheight){

    ImgD.height=aheight; 

    ImgD.width=(image.width*awidth)/image.height; 

   }else{ 

    ImgD.width=image.width;

    ImgD.height=image.height; 

   } 

    /*ImgD.alt="bigpic"  */ 

  } 

}

}
