// JavaScript Document

function rotateImg() {
	//randomize number
	var pixObject = document.getElementById("pixArea");
	pixObject.style.background = "black";
	var rnum = rand_no = Math.ceil(11*Math.random())
	var imgName = "pix_" + rnum + ".jpg";
	//change property
	var newPix = "url(./images/" +imgName+") top no-repeat #000000";
	pixObject.style.background = newPix;
	//alert(imgName + "\n" + newPix);
}

function verifyQF() {
	var rFN = document.fq.iFname.value;
	var rLN = document.fq.iLname.value;
	var rFO = document.fq.iHfone.value;
	var errMsg = "Please Complete the Following Fields: \n - First Name \n - Last Name \n - Home or Cell Number";
	
	if (rFN.length < 1 || rLN.length < 1 || rFO.length < 1) {
		alert (errMsg);
	} else {
		document.fq.submit();
	}
}


function popup(url, name, windowWidth, windowHeight){
	var myleft=(screen.width)?(screen.width-windowWidth)/2:100;
    var mytop=(screen.height)?(screen.height-windowHeight)/2:100;
    var properties = "width="+windowWidth+",height="+windowHeight+",scrollbars=yes,resizable=0,location=0,directories=0,menubar=0,toolbar=0,top="+mytop+",left="+myleft;
    //properties = "width=400,height=400";
    //window.open(url, name, properties);
    window.open(url,
	"mywindow",properties);
}

function verifyOrder() {
	var willBuy = document.getElementById("chkBuy").checked;
	if (willBuy == false) {
		alert("Please check the confirmation checkbox above \n to proceed to the checkout area.");
		return false;
	} else {
		window.location = "http://www.payloadz.com/go/sip?id=562803";
	}
}