//PRELOAD IMAGES
function preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}
//PRINT PAGE
function printpage() {
   window.print();
}
//POP-UP
function popup(url, name, w, h, scroll) {
   var winl = (screen.width - w) / 2;
   var wint = (screen.height - h) / 2;
   spec = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
   window.open(url, name, spec);
}
//POP-UP CENTERED
function openPopup (width, height, url, name) {
	var windowWidth = window.screen.width;
	var windowHeight = window.screen.height;
	var popupWidth = width;
	var popupHeight = height;
	var popupTop = (windowHeight - popupHeight) / 2;
	var popupLeft = (windowWidth - popupWidth) / 2;
	var features = "width=" +  popupWidth + ",height=" + popupHeight + ",top=" + popupTop + ",left=" + popupLeft;
	window.open(url, name, features);			
}
//DISCLAIMER
function showDisclaimer (disclaimer, name, linkId) {
	topPosition = (document.all)?document.documentElement.scrollTop:window.pageYOffset; 
	document.getElementById(disclaimer).style.display = 'block';
	document.getElementById(disclaimer).style.top = topPosition + 350 + "px";

	document.getElementById("link").href = linkId;
	
	if(name == "offers"){
		document.getElementById("dProducts").style.display = 'none';
		document.getElementById("dContactUs").style.display = 'none';
		document.getElementById("dOffers").style.display = 'block';
		document.getElementById("dOffers2").style.display = 'none';
		
	}
	else if(name == "offers2"){
		document.getElementById("dProducts").style.display = 'none';
		document.getElementById("dContactUs").style.display = 'none';
		document.getElementById("dOffers").style.display = 'none';
		document.getElementById("dOffers2").style.display = 'block';
		
	}
	else if(name == "contact"){
		document.getElementById("dProducts").style.display = 'none';
		document.getElementById("dContactUs").style.display = 'block';
		document.getElementById("dOffers").style.display = 'none';
		document.getElementById("dOffers2").style.display = 'none';
	}
	else {
		document.getElementById("dProducts").style.display = 'block';
		document.getElementById("dOffers").style.display = 'none';
		document.getElementById("dContactUs").style.display = 'none';
		document.getElementById("dOffers2").style.display = 'none';
	}
}
function closeDisclaimer(disclaimer){
	document.getElementById(disclaimer).style.display = 'none';
}
