﻿// Power by 汇讯网络 http://www.hx-cms.com QQ：517075321
function setHomepage() { 
if (document.all) {
document.body.style.behavior = 'url(#default#homepage)';
document.body.setHomePage('#');}
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','#');
} 　
}
function addCookie() {
if (document.all) {
window.external.addFavorite('#', '深圳市路远电子科技有限公司');
}
else if (window.sidebar) {
window.sidebar.addPanel('深圳市路远电子科技有限公司','#', "");
}
} 

var  flag=false;  
function  DrawImage(ImgD,w,h){  
     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;  
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=image.width+"×"+image.height;  
         }  
       else{  
         if(image.height>h){      
         ImgD.height=h;  
         ImgD.width=(image.width*h)/image.height;            
         }else{  
         ImgD.width=image.width;      
         ImgD.height=image.height;  
         }  
         ImgD.alt=image.width+"×"+image.height;  
         }  
       }  
}

function setPosition(o){
	var pn=o.parentNode;
	var pHeight=pn.offsetHeight;
	var sHeight=o.offsetHeight;
	o.style.position="absolute";
	o.style.top=(pHeight-sHeight)/2+"px";
	//**
	var pWidth=pn.offsetWidth;
	var sWidth=o.offsetWidth;
	o.style.left=(pWidth-sWidth)/2+"px";
}

function verf(navId){
	if(document.getElementById(navId).style.display=='none'){
		document.getElementById(navId).style.display='';
		}
	else{
		document.getElementById(navId).style.display='none';
	}
}

var num=2;
function $(obj){
	return document.getElementById(obj);
}
function show_tab(n){
	$("tabs").filters[0].Apply();
	for(var i=1;i<=num;i++){
		if(i==n){
			$("tab"+i).style.display="block";
		}else{
			$("tab"+i).style.display="none";
		}
	}
	$("tabs").filters[0].Play();
}

function HxCmsSwf(ur,w,h){ 
document.write('<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+w+'" height="'+h+'">'); 
document.write('<param name="movie" value="'+ur+'">'); 
document.write('<param name="quality" value="high"> '); 
document.write('<param name="wmode" value="transparent"> '); 
document.write('<param name="menu" value="false"> '); 
document.write('<embed src="'+ur+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="'+w+'" height="'+h+'" quality="High" wmode="transparent">'); 
document.write('</embed>'); 
document.write('</object>'); 
}

function addbookmark(){
window.external.AddFavorite('#/', '深圳市路远电子科技有限公司')
}

function killErrors() {
    return true;
}
window.onerror = killErrors;
//版权所有 Copyright 2011 汇讯网络(www.hx-cms.com) All rights reserved. 请保留版权
