/*Home Page*/


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

MM_reloadPage(true);

adImages = new Array("images/photo_gifts_pic3.jpg","images/photo_gifts_pic.jpg","images/photo_gifts_pic2.jpg")
	adURL = new Array("bonusprint.com/us/poster-size-prints.htm?level=2","bonusprint.com/us/photo_gifts_mugs.htm?level=2","bonusprint.com/us/photo_gifts_mats.htm?level=2")
	thisAd = 0
	imgCt = adImages.length

	function rotate() {
		if (document.images) {
			if (document.adBanner.complete) {
				thisAd++
				if (thisAd == imgCt) {
					thisAd = 0
				}
				document.adBanner.src=adImages[thisAd]
			}
		  	setTimeout("rotate()", 4 * 1000)
	  	}
	}
	
	function newLocation() {
		document.location.href = "http://www." + adURL[thisAd]
	}
	function MM_openBrWindow(theURL,winName,features) { //v2.0
  		window.open(theURL,winName,features);
	}
	function openWin(URL,aName,wName,Scroll,W,H,T,L) { //v2.0
	window.name = aName; aWindow = window.open(URL,wName,"toolbar=no,location=no,directories=no,status=no,scrollbars="+ Scroll +",width="+ W +",height="+ H +",top="+ T +",left="+ L +",resizable=no,menubar=no");
}
	function MM_openBrWindow4() { //v2.0
  window.open("nominate.htm","","toolbar=no,scrollbars=no,resizable=no,width=700,height=520");
}
	function MM_openBrWindow5() {  
		window.open("legal.htm","","toolbar=no,scrollbars=yes,resizable=no,width=600,height=530");
	}
	
	function MM_openBrWindow6() { //v2.0
  		window.open("privacy.htm","privacy","toolbar=no,scrollbars=yes,resizable=no,width=600,height=530");
	}
	
	function Aopensnap(){
		comsnapwinmp = window.open('http://www.bonusprint.com/global/bonus_global_pop_up.htm', "comsnapwinmp", "height=270, width=320,toolbar=no,menubar=no,resizable=no");						
	}
function Aopensnappc(){

						comsnapwinmp = window.open('download_thanks.asp', "comsnapwinmp", "height=225, width=450,noresizable ,noscrollbars");						
					}

function Aopensnapmac(){

						comsnapwinmp = window.open('macdownload_thanks.asp', "comsnapwinmp", "height=225, width=450,noresizable ,noscrollbars");						
					}
	function qualityChart(){
		comsnapwinmp = window.open('quality_chart.htm', "comsnapwinmp", "height=600, width=480,resizable ,scrollbars=no");
	}

/*END Home Page*/

function ordergreetingcards() {
		var x = (screen.availHeight - 490)/2;
		var y = (screen.availWidth - 660)/2;
		window.open( 'http://webalbum.bonusprint.com/USGC01/main.aspx', null, "top="+x+",left="+y+",height=490,width=660,status=0,scrollbars=0,resizable=0,toolbar=0,menubar=0,titlebar=0;location=0");
	}

function MM_openBrWindowHTML() {  
	window.open("print_pix_walkthrough.htm","PrintHTML","toolbar=no,scrollbars=yes,resizable=no,width=660,height=530");
}

function MM_openBrWindowPDF() {  
	window.open("http://www.bonusprint.com/us/pix_guided_tour.pdf","PrintPDF","toolbar=no,scrollbars=yes,resizable=yes,location=yes, width=660,height=530");
}


function getCookieValue()
{
	var dc = document.cookie;
	var prefix = "refer=";
	var begin = dc.indexOf("; " + prefix);
	if (begin == -1) {
    	begin = dc.indexOf(prefix);
    		if (begin != 0) return "empty";
  			} else
    		begin += 2;
  		var end = document.cookie.indexOf(";", begin);
  		if (end == -1)
    	end = dc.length;
		return unescape(dc.substring(begin + prefix.length, end));
}

//Browser upload Generic
function htmlUpload(productgroup) {
ref = getCookieValue();
var link="http://webalbum.bonusprint.com/usipc01/default.aspx?level=0&sub=0&refer=" + ref; 
if(productgroup != null){
link += "&productgroup="+ productgroup;
}

window.location = link;
}
//End Browser upload Generic//

//Browser upload by product
function htmlUploadProduct(productID) {
ref = getCookieValue();
var link="http://webalbum.bonusprint.com/usipc01/default.aspx?level=0&sub=0&refer=" + ref; 
if(productID != null){
link += "&productID="+ productID+ "&productType=REORD";
}
window.location = link;
}  
//End Browser upload by product//