function insertMovie(src, width, height)
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+width+'" height="'+height+'"  >');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="'+src+'" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#ffffff" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<embed src="'+src+'" wmode="transparent" quality="high" bgcolor="#ffffff" width="'+width+'" height="'+height+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
function expand(divID){
	img = document.getElementById("expand_" + divID);
	img.src = img.src.substr(img.src.lastIndexOf("/")+1) == "plus_button.gif" ? "/images/minus_button.gif" : "/images/plus_button.gif";
	box = document.getElementById(divID);
	box.style.display = box.style.display == "none" ? "block" : "none";
}
function expand2(divID){
	hideAll(divID);
	img = document.getElementById("expand_" + divID);
	img.src = img.src.substr(img.src.lastIndexOf("/")+1) == "minus_button.gif" ? "/images/plus_button.gif" : "/images/minus_button.gif";
	box = document.getElementById(divID);
	box.style.display = box.style.display == "block" ? "none" : "block";
}
function hideAll(id){
	var parent = document.getElementById(id).parentNode;
	var divs = parent.getElementsByTagName('div');
	var imgs = parent.getElementsByTagName('img');
	var current_img = "expand_" + id; 
	for(i=0;i<divs.length;i++){
		if(divs[i].className == 'hidden' && divs[i].id != id){
			divs[i].style.display = 'none';
		}
	}
	for(i=0;i<imgs.length;i++){
		//alert(imgs[i].id)
		if(imgs[i].src.substr(imgs[i].src.lastIndexOf("/")+1) == "minus_button.gif" && imgs[i].id != current_img){
			imgs[i].src = "/images/plus_button.gif";
		}
	}
}
function showProducts(id){
	if(document.getElementById(id).style.display == 'block'){
	document.getElementById('transformerProducts').style.display = 'none';
	document.getElementById('isolationProducts').style.display = 'none';
	} else {
	document.getElementById('transformerProducts').style.display = 'none';
	document.getElementById('isolationProducts').style.display = 'none';
	document.getElementById(id).style.display = 'block';		
	}
}

function showProducts2(id){
	if(document.getElementById(id).style.display == 'block'){
	document.getElementById('transformerProducts2').style.display = 'none';
	document.getElementById('isolationProducts2').style.display = 'none';
	} else {
	document.getElementById('transformerProducts2').style.display = 'none';
	document.getElementById('isolationProducts2').style.display = 'none';
	document.getElementById(id).style.display = 'block';		
	}
}

function showProducts3(id){
	if(document.getElementById(id).style.display == 'block'){
	document.getElementById('transformerProducts3').style.display = 'none';
	} else {
	document.getElementById('transformerProducts3').style.display = 'none';
	document.getElementById(id).style.display = 'block';		
	}
}

function preload(img, on)
{
	off = img.src;
	offfull = img.src;
	onfull = on;
	path = off.substring(0,off.lastIndexOf('/')+1); 
	onfull = path + onfull;
	//alert(onfull);
	if(off.lastIndexOf('/') != -1) // if there is a path, strip it
		{
			 off = off.substring(off.lastIndexOf('/')+1);
		}
	if(on.lastIndexOf('/') != -1) // if there is a path, strip it
		{
			 on = on.substring(on.lastIndexOf('/')+1);
		}
	if(on != off)
		{		  
      off_ex = off.substring(off.lastIndexOf('.')) // extract extension     
			off = off.substring(0,off.lastIndexOf('.')); //strip extension	       		
      on_ex = on.substring(on.lastIndexOf('.')) // extract extension     
			on = on.substring(0,on.lastIndexOf('.')); //strip extension			      		
			eval(off + " = new Image(); ");						 
			eval(off + ".src = '" + offfull +"'");			
			eval(on + " = new Image(); ");			
			eval(on + ".src = '" + onfull +"'");
			var image_on = eval(on + ".src");
			var image_off = eval(off + ".src");
			img.onmouseover = function() { img.src = image_on;}
			img.onmouseout = function() { img.src = image_off;}
		}
}
function open_panel(id)
{
	document.getElementById('safety').style.display = "none";
	document.getElementById('low_inrush').style.display = "none";
	document.getElementById('mounting').style.display = "none";
	document.getElementById(id).style.display = "block";
	
	document.getElementById('safety_tab').style.background = "#ffffff url(images/tab_one_off.gif)";
	document.getElementById('safety_tab').firstChild.className = "";
	document.getElementById('low_inrush_tab').style.background = "#ffffff url(images/tab_one_off.gif)";
	document.getElementById('low_inrush_tab').firstChild.className = "";
	document.getElementById('mounting_tab').style.background = "#ffffff url(images/tab_one_off.gif)";
	document.getElementById('mounting_tab').firstChild.className = "";
	
	switch(id)
	{
		case "safety":
			document.getElementById('safety_tab').style.background = "#ffffff url(images/tab_one_on.gif)";
			document.getElementById('safety_tab').firstChild.className = "red_link";
			break;
		case "low_inrush":
			document.getElementById('low_inrush_tab').style.background = "#ffffff url(images/tab_one_on.gif)";
			document.getElementById('low_inrush_tab').firstChild.className = "red_link";
			break;
		case "mounting":
			document.getElementById('mounting_tab').style.background = "#ffffff url(images/tab_one_on.gif)";
			document.getElementById('mounting_tab').firstChild.className = "red_link";
			break;
		
	}
}

function highlightProduct(id, c){
	var ul = document.getElementById(id);
	ul.style.display = 'block';
	var li = ul.getElementsByTagName('li');
	for(i=0;i<li.length;i++){
		if(i==c){
			li[i].firstChild.className = li[i].firstChild.className+' highlight';
		}
	}
	//ul.childNode[c].firstChild.className = ul.childNode[c].firstChild.className+' highlight'; 
}

function popupmap(id) {
document.getElementById("southeast").style.display="none";
document.getElementById("northeast").style.display="none";
document.getElementById("south").style.display="none";
document.getElementById("corporate").style.display="none";
document.getElementById("default").style.display="none";
document.getElementById(id).style.display="block";
}


			
			var popup="All content on this site is copyright of Powertronix, Inc.\nAny reproduction of material on this site is strictly prohibited. "; 			
			function noway(go) { if 
			(document.all) { if (event.button == 2) { alert(popup); return false; } } if (document.layers) 
			{ if (go.which == 3) { alert(popup); return false; } } } if (document.layers) 
			{ document.captureEvents(Event.MOUSEDOWN); } document.onmousedown=noway; 



