﻿function writeNavigator(description) {
document.write("<div class='toolBar'>");
	if (description=="back") {
		document.write("<a href='javascript:history.back()'>[ BACK ]</a>");
	}
	else if (description=="top") {
		document.write("<a href='#'>[ TOP ]</a>");
	}
	else if (description=="backAndTop") {
		document.write("<a href='#'>[ TOP ]</a><a href='javascript:history.back()'>[ BACK ]</a>");
	}
	else if (description=="backAndTop") {
		document.write("<a href='#'>[ TOP ]</a><a href='javascript:history.back()'>[ BACK ]</a>");
	}
	else if (description=="closeAndTop") {
		document.write("<a href='#'>[ TOP ]</a><a href='javascript:self.close()'><img src='../images/btn_close.gif' width='50' height='11' border='0'></a>");
	}
document.write("</div>");	
}

function fun_tableBorder(obj) {
	obj.border=0;
	obj.cellSpacing=0;
	obj.cellPadding=5;
	obj.align="center";
}
function fun_table_listBorder(obj) {
	obj.border=0;
	obj.cellSpacing=0;
	obj.cellPadding=3;
	obj.align="center";
}
function fun_table_listBorder2(obj) {
	obj.border=0;
	obj.cellSpacing=1;
	obj.cellPadding=3;
	obj.align="center";
}
function fun_product_table(obj) {
	obj.border=0;
	obj.cellSpacing=5;
	obj.cellPadding=0;
	obj.align="center";
}

function fun_productList_table(obj) {
	obj.border=0;
	obj.cellSpacing=0;
	obj.cellPadding=0;
	obj.align="center";
}
function fun_default_table(obj) {
	obj.border=0;
	obj.cellSpacing=1;
	obj.cellPadding=5;
}




function controlDisplay(obj) {
	var thisObj=document.all(obj)
	if (thisObj.style.display=="") {
		thisObj.style.display="none";
	}
	else {
		thisObj.style.display="";
	}
}

function openWin(strUrl,winName,width,height) {	
	x=(screen.availWidth-width)/2
	y=(screen.availHeight-height)/2
	window.open(strUrl,winName,"width="+width+",height="+height+",left="+x+",top="+y+",scrollbars=yes")	
}

function justOpenWin(strUrl) {	
	window.open(strUrl,'',"")	
}
function writeTool() {
	document.write("<div class='toolBar'><a href=\"javascript:history.back()\"><img src=\"../images/icon_back.gif\" alt=\"BACK\" width=23 height=15 border=0></a> <a href=\"javascript:window.print();\"><img src=\"../images/icon_print.gif\" alt=\"PRINT\" width=23 height=15 border=0></a> <a href=\"#top\"><img src=\"../images/icon_top.gif\" width=23 height=15 border=0></a></div>");
}



function show_image(str_img) {
newwin=window.open('about:blank','','top=50,left=50');
newwin.document.write("<body style='margin:0px;'><img src='../../product_files/electrical/"+str_img+"' onload='self.resizeTo(this.offsetWidth+10,this.offsetHeight+15);'>");
}

//[add by linsz 070728
function fun_mainTable(obj) {
	obj.border=0;
	obj.cellSpacing=0;
	obj.cellPadding=0;
	obj.align="center";	
}

//]