// ###############################################
function load_dpan(){
// ###############################################
// This function loads the decorative panel browser

	window.open('http://www.wayne-windows.com/products/decopanels.htm','','toolbar=no,menubar=no,location=no,height=400,width=600');
}

// ###############################################
function load_picbrowser(pic_id){
// ###############################################
// This function loads the picture gallery page in a new window
	
	urlparams = "";
	
	if (pic_id){
		urlparams = "?picid=" + pic_id;
	}

	window.open('http://www.wayne-windows.com/pic-browser.htm' + urlparams,'','toolbar=no,menubar=no,location=no,height=420,width=540');
}
// ###############################################
function load_pvs(){
// ###############################################
// This function loads the profil viewer page in a new window
	pvswin=window.open('http://www.wayne-windows.com/techinfo/pvs/index.htm','','toolbar=no,menubar=no,location=no,height=560,width=780');
}
// ###############################################
function load_gglead(){
// ###############################################
// This function loads the profil viewer page in a new window
	ggleadwin=window.open('http://www.wayne-windows.com/techinfo/gg-lead.htm','','toolbar=no,menubar=no,location=no,height=440,width=600');
}
// ###############################################
function load_ggdoorbevels(){
// ###############################################
// This function loads the profil viewer page in a new window
	ggdoorbevwin=window.open('http://www.wayne-windows.com/techinfo/gg-door-bevels.htm','','toolbar=no,menubar=no,location=no,height=440,width=600');
}
// ###############################################
function load_flbevels(){
// ###############################################
// This function loads the profil viewer page in a new window
	flbevekswin=window.open('http://www.wayne-windows.com/techinfo/gg-fanlight-bevels.htm','','toolbar=no,menubar=no,location=no,height=440,width=670');
}
// ###############################################
function load_picgallery(group_name){
// ###############################################
// This function loads the picture gallery window
	picgalwin=window.open('http://www.wayne-windows.com/products/picgallery.php?group=' + group_name,'','toolbar=no,menubar=no,location=no,height=410,width=530,scrollbars=no');
}
// ###############################################
function load_locationmap(){
// ###############################################
// Use this function to load the location map window
	locationmapwin=window.open('http://www.wayne-windows.com/contact/locationmap.htm','','toolbar=no,menubar=no,location=no,height=500,width=620,scrollbars=yes');
}
// ###############################################
function close_pvs(){
// ###############################################
// This function loads the profil viewer page in a new window
	window.close(pvswin);
}
// ###############################################
function page_load(page){
// ###############################################
// This function is run on page load through-out the site.

}
// ###############################################
function toggleNavImg(imgname,num){
// ###############################################
// Toggles navigation images
	
//	if (document.images){
	
//		imag = new Array();
	
//		imag[1] = "/images/lnk-on-company.gif";
//		imag[2] = "/images/lnk-on-company.gif";
	
//		imag[3] = "/images/lnk-on-products.gif";
//		imag[4] = "/images/lnk-on-products.gif";
		
//		imag[5] = "/images/lnk-on-technicalinfo.gif";
//		imag[6] = "/images/lnk-on-technicalinfo.gif";
		
//		imag[7] = "/images/lnk-on-quality.gif";
//		imag[8] = "/images/lnk-on-quality.gif";
		
//		imag[9] = "/images/lnk-on-location.gif";
//		imag[10] = "/images/lnk-on-location.gif";
		
//		imag[11] = "/images/lnk-on-contact.gif";
//		imag[12] = "/images/lnk-on-contact.gif";
	
//		imag[13] = "/images/lnk-on-email.gif";
//		imag[14] = "/images/lnk-on-email.gif";
	
//		im = new Array();
//		for (var i = 1; i <= imag.length; i++){
//			im[i] = new Image();
//			im[i].src = imag[i];
//		}
		
//		imgname.src = im[num].src

//	}
}
// ###############################################
function toggleArrow(imgname,num){
// ###############################################
// Toggles navigation images

	if (document.images){
	
		arrows = new Array();
		
		arrows[1] = "/images/bullet-uparrow-on.gif";
		arrows[2] = "/images/bullet-uparrow-off.gif";
		
		arrows[3] = "/images/bullet-rightarrow-on.gif";
		arrows[4] = "/images/bullet-downarrow-off.gif";
		
		im = new Array();
		for (var i = 1; i <= arrows.length; i++){
			im[i] = new Image();
			im[i].src = arrows[i];
		}
		
		wall.src = im[num].src
		
	}

}

// ###############################################
function make_emaillink(eml_alias, inline){
// ###############################################
	// Use this function to create email links and avoid email harvesting.

	document.write ('<a href="mailto:' + eml_alias + '@' + 'Wayne-Windows.co.uk' + '">' + inline + '</a>');
	
}