function iswop(element,url) {
	var img=null;
	if(document.getElementById) {
		img = document.getElementById(element);
	} else if (document.all) {
		img = document.all[element];
	}
	if (img) {
		img.src=url;
	}
}

function chgtext(element,msg) {
	document.getElementById(element).innerHTML=msg;
}


function reset_synopsis() {
	chgtext ('synopsis','Click on the product series to learn more...');
}


function load() {
	reset_synopsis();
}


function opacity(id, opacStart, opacEnd, millisec) {
	//speed for each frame
	var speed = Math.round(millisec / 100);
	var timer = 0;
	//decide if blending IN or OUT, if no change, do nothing
	if(opacStart > opacEnd) {
	for(i = opacStart; i >= opacEnd; i--) {
		setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
		timer++;
		}
	} else if(opacStart < opacEnd) {
		for(i = opacStart; i <= opacEnd; i++) {
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	}
}

function changeOpac(opacity, id) {
	var object = document.getElementById(id).style;
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
} 

function ToggleOpacity(id, millisec) {
	//if an element is invisible, make it visible, else make it ivisible
	if(document.getElementById(id).style.opacity == 0) {
		opacity(id, 0, 100, millisec);
	} else {
		opacity(id, 100, 0, millisec);
	}
} 

// Format price to $n,nnn.00
//

function formatPrice(price){
	if( isNaN(price) ) return price;
	if (price.length==4) var str = "$  " + price.substring(0,1);
	else                 var str = "$"  + price.substring(0,2);
	str += "," + price.slice(-3) +".00";
	return str;
}

// Write a gorgeously formated table row
//
function writeRow( Product_Family, Part_Number, Description, Screen_Diag, Screen_Size, Screen_Image, Aspect, RRP ){

	document.writeln('<tr align="center" style="font-size: 8pt;">');
	document.writeln('<td bgcolor="#333333">&nbsp;<\/td>');
	document.writeln('<td bgcolor="#666666" style="border-bottom:1px solid #000000; text-align:left">&nbsp;');
	document.writeln('<font style="color: #FFFFFF; font-size: 8pt;">'  + Part_Number + ' - ' + Description + '<\/font><\/td>');
	document.writeln('<td bgcolor="#333333" style="border-bottom:1px solid #000000;">&nbsp;');
	document.writeln('<td bgcolor="#DDDDDD" style="border-bottom: 1px solid #000000;">' + Screen_Diag + '&quot;');

	document.writeln('<td bgcolor="#DDDDDD" style="border-bottom: 1px solid #000000;">' + Screen_Size + '<\/td>');
	document.writeln('<td bgcolor="#DDDDDD" style="border-bottom: 1px solid #000000;">' + Screen_Image + '<\/td>');
	document.writeln('<td bgcolor="#DDDDDD" style="border-bottom: 1px solid #000000;">' + Aspect +'<\/td>');
	document.writeln('<td bgcolor="#DDDDDD" style="border-bottom: 1px solid #000000;">' + RRP + '<\/td>');
	document.writeln('<\/tr>');
}
//-->