//home rollover
function rolloverHome(imageNumber) {
	var text = "content"+imageNumber;
	var head = "vid"+imageNumber;
	document.getElementById(text).style.display = "";
	document.getElementById(head).style.display = "none";
	if (imageNames[imageNumber] != ""){	
		theImage = document.getElementById(imageNames[imageNumber]);
		theImage.src = 'images/'+directory+'/'+imageNames[imageNumber]+'-on.gif';
	}
}
function rolloutHome(imageNumber) {
	var text = "content"+imageNumber;
	var head = "vid"+imageNumber;
	document.getElementById(text).style.display = "none";
	document.getElementById(head).style.display = "";
	for (i=1;i<imageNames.length;i++){
		if (imageNames[i] != "") {
		theImage = document.getElementById(imageNames[i]);
		theImage.src = 'images/'+directory+'/'+imageNames[i]+'-off.gif';
		}
	}
}


function rollover(cell,image,directory) {
	if (cell.className == "left") {
		cell.className = "highlightLeft";
	} else if(cell.className == "middle") {
		cell.className = "highlightMiddle";	
	} else if(cell.className == "right") {
		cell.className = "highlightRight";	
	}
	if (image != ""){	
		theImage = document.getElementById(image);
		theImage.src = 'images/'+directory+'/'+image+'-on.gif';
	}
}
function rollout(cell,image,directory) {
	if (cell.className == "highlightLeft") {
		cell.className = "left";
	} else if(cell.className == "highlightMiddle") {
		cell.className = "middle";	
	} else if(cell.className == "highlightRight") {
		cell.className = "right";	
	}
	if (image != ""){
		theImage = document.getElementById(image);
		theImage.src = 'images/'+directory+'/'+image+'-off.gif';		
	}
}
function onClick(html) {
	window.location = html;
}
function rolloverShow(content,imageNumber,hover) {
	if(content!=""){
	document.getElementById('content0').style.display = "none";	
	document.getElementById('sidebar').style.display = "none";	
	document.getElementById(content).style.display = "";
	}
	if (imageNumber != 0){	
		theImage = document.getElementById(imageNames[imageNumber]);
		theImage.src = 'images/'+directory+'/'+imageNames[imageNumber]+'-on.gif';
	}
	if(hover!=""){
		hover.style.cursor='hand';
		hover.style.cursor='pointer';
	}
}
function rolloutHide() {
	for (i=1;i<imageNames.length;i++){
		if (imageNames[i] != "") {
		theImage = document.getElementById(imageNames[i]);
		theImage.src = 'images/'+directory+'/'+imageNames[i]+'-off.gif';
		}
	}	
	document.getElementById('content0').style.display = "";
	document.getElementById('sidebar').style.display = "";
	for (i=1;i<imageNames.length;i++){
		contentName = "content"+i;
		document.getElementById(contentName).style.display = "none";	
	}
}

screenW = window.screen.availWidth;
screenH = window.screen.availHeight;
windowH = 650;
windowW	= 600;
posL = (screenW - windowW)*.5;
posT = (screenH - windowH)*.5;


function openRequestForm(eh,comment) {
	path = "form.asp?type="+eh+"&comment="+comment;
	_w = window.open(path,'new','width='+windowW+',height='+windowH+',top='+posT+',left='+posL+',menubar=0,location=0,toolbar=0,personalbar=0,status=0,scrollbars=1');
	//_w.document.open();
	_w.document.focus();
}
function openCustomerForm(eh,comment) {
	path = "form_customerCentre.asp?type="+eh+"&comment="+comment;
	_w = window.open(path,'new','width='+windowW+',height='+windowH+',top='+posT+',left='+posL+',menubar=0,location=0,toolbar=0,personalbar=0,status=0,scrollbars=1');
	//_w.document.open();
	_w.document.focus();
}
function openResidentialForm(eh,comment) {
	path = "form.asp?section=residential&type="+eh+"&comment="+comment;
	_w = window.open(path,'new','width='+windowW+',height='+windowH+',top='+posT+',left='+posL+',menubar=0,location=0,toolbar=0,personalbar=0,status=0,scrollbars=1');
	//_w.document.open();
	_w.document.focus();
}
function openCustomerAccountsForm() {
	path = "https://web.jdsecurity.com.au/form_customercentre_accounts.asp";
	_w = window.open(path,'new','width='+windowW+',height='+windowH+',top='+posT+',left='+posL+',menubar=0,location=0,toolbar=0,personalbar=0,status=1,scrollbars=1');
	//_w.document.open();
	_w.document.focus();
}
