// JavaScript Document

<!--
var myinfo=new Array("","home-theater","lcd-tv","plasma-install","lcd-service");
var myinstallpage = new Array("","Home-Theatre-Installations.php", "LCD-and-Plasma-TV-Installations.php", "Multi-room-audio-and-video-Installations.php", "Outdoor-speakers-Installations.php", "Commercial-Installations.php", "Smart-Home-Cabling-Installations.php", "Home-and-Office-Pre-wire-Installations.php", "TV-Antenna-Cabling-Installations.php");
var myprodpage = new Array("","Home-Theatre-Systems.php", "LCD-TVs.php", "Plasma-TVs.php", "Home-Theater-Projectors.php", "Surround-Sound-Systems.php", "Speakers-and-Subwoofers.php", "Hi-Fi-Components.php", "Accessories-and-Spares.php");
var myhomepage = new Array("","products/Home-Theatre-Systems.php","products/LCD-TVs.php","products/Surround-Sound-Systems.php","installations.php");
MM_preloadImages("images/product-box-green.jpg","images/product-box-blue.jpg");

function homePage(Hpage){
	parent.location=""+myhomepage[Hpage]+"";
}
function prodPage(Ppage){
	parent.location="products/"+myprodpage[Ppage]+"";
}

function installPage(page){
	parent.location="installation/"+myinstallpage[page]+"";
}

function setupDiv(){
	for (var i=myinfo.length-1; i>0; --i ){
		MM_preloadImages("images/product-box-"+i+".jpg");
		document.getElementById(myinfo[i]).style.visibility='hidden';
	}
	document.getElementById("text-intro").style.visibility ='visible';
}

function getBK(divID,normal){
	if(normal == 'prod'){
		document.getElementById("prod"+divID).style.background = 'url(\'images/product-box-green.jpg\') no-repeat';
	}
	if(normal == 'inst'){
		document.getElementById("prod"+divID).style.background = 'url(\'images/product-box-blue.jpg\') no-repeat';
	}

	if (normal == 'n'){
		document.getElementById("prod"+divID).style.background =  'url(\'images/product-box.jpg\') no-repeat';
	}
	if(normal == 'h'){
		document.getElementById("prod"+divID).style.background =  'url(\'images/product-box-'+divID+'.jpg\') no-repeat';
		setupDiv();
		document.getElementById("text-intro").style.visibility = 'hidden';
		document.getElementById(myinfo[divID]).style.visibility = 'visible';
	}
}

function topHeader(actDiv,dis){
	if(dis=='show'){
	document.getElementById(actDiv).style.visibility = 'visible';

	}
	else{
	document.getElementById(actDiv).style.visibility = 'hidden';
	}
	
	
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

/*function validate_required(field,alerttxt)
{
	with (field)
	{
		if (value==null||value=="")
			{alert(alerttxt);return false}
		else {return true}
	}
}

function validate_form(thisform)
{
	with (thisform)
		{
		if (validate_required(email,"Email must be filled out!")==false)
			{email.focus();return false}
		}
		if (validate_required(comment,"Comment must be filled out!")==false)
			{comment.focus();return false}
		}
		if (validate_required(name,"Name must be filled out!")==false)
			{name.focus();return false}
		}
		if (validate_required(phone,"Phone Number must be filled out!")==false)
			{phone.focus();return false}
		}
	}
}*/
//-->
