<!-- 

var obj = null;
var thePics = new Array();

thePics = new Array("home","how","datagrooming","order","about","faq","system","partners","cart","mp3","why","mediaservers","custominstallers","mp3players","company","inthenews","press","contact","home_how","home_datagroom","home_why","home_order", "franchising");

function swap(name,state) {
    if(thePics[name+state] && thePics[name+state].complete) {
        document.images[name].src = thePics[name+state].src;
    }
}

function preloadPics(thePics) {
	for (i=0;i<thePics.length;i++){
		thePics[thePics[i]] = new Image();
		thePics[thePics[i]].src = '../images/nav_'+thePics[i]+'.gif';
		thePics[thePics[i]+'_on'] = new Image();
		thePics[thePics[i]+'_on'].src = '../images/nav_'+thePics[i]+'_on.gif';
	}
}

preloadPics(thePics);

function VerifyCustomData() {
	if (document.customform.Custom_Name.value == "") {
		alert("You must enter your Name.");
		return false;
	} else if (document.customform.Custom_Email.value == "") {
		alert("You must enter your Email Address.");
		return false;
	} else
		return true;
}


function checkTerms(fname){
	if (fname.term1.checked == false ) {
		alert('To complete your order, you must agree to the Terms & Conditions by checking all the boxes on the page.');
		return false;
	} else if (fname.term2.checked == false ) {
		alert('To complete your order, you must agree to the Terms & Conditions by checking all the boxes on the page.');
		return false;
	} else if (fname.term3.checked == false ) {
		alert('To complete your order, you must agree to the Terms & Conditions by checking all the boxes on the page.');
		return false;
	} else if (fname.term4.checked == false ) {
		alert('To complete your order, you must agree to the Terms & Conditions by checking all the boxes on the page.');
		return false;
	} else
		return true;
}

function checkTermsNA(){
	if (confirm("By not agreeing to the Terms & Conditions, we cannot complete your order. Are you sure?")) {
		document.location.href='default.asp'
	} else
		alert('To complete your order, you must agree to the Terms & Conditions by checking all the boxes on the page.');
		return false;
}

function checkCIReg(fname){
	if (fname.term1.checked == false ) {
		alert('To complete this form, you must agree to the Custom Installer Agreement by checking the box.');
		return false;
	} else
		return true;
}

function checkShip(fname){
	for (var i=0;i<fname.shipDetails.length;i++) {
		if (fname.shipDetails[i].checked ) {
		return true;
		}
	} 
	//alert(fname.shipDetails.length);
	alert('You must choose a Shipping Method to continue.');
	return false;
}

function checkNumCDs(fname){
	if (fname.numCDs.value == -1 ) {
		return true
	} else if (fname.numCDs.value < 50 ) {
		alert('The minimum order is 50 CDs');
		return false;
	} else if (fname.numCDs.value > 1000 ) {
		alert('If you wish to convert more than 1000 CDs, please contact us.');
		return false;
	} else
		return true;
}

function checkNumCDsNokia(fname){
	if (fname.numCDs.value == -1 ) {
		return true
	} else if (fname.numCDs.value < 40 ) {
		alert('The minimum order is 40 CDs');
		return false;
	} else if (fname.numCDs.value > 1000 ) {
		alert('If you wish to convert more than 1000 CDs, please contact us.');
		return false;
	} else
		return true;
}

function popWin(location) {
	var dx=400;
	var dy=460;
	var w = window.open(location, 'popWin', 'width=' + dx + ',height=' + dy + ',status=no,resizable=no,menubar=yes,location=no,scrollbars=yes,toolbar=no');
	w.focus();
}

function validateCC()
		{
			if(document.AuthorizeNetForm.cardNumber.value=='')
			{ alert("Please enter your Card Number"); document.AuthorizeNetForm.cardNumber.focus(); return false; }
			if(document.AuthorizeNetForm.CardExpMonth.value=='')
			{ alert("Please enter your Card Expiration Month"); document.AuthorizeNetForm.CardExpMonth.focus(); return false; }
			if(document.AuthorizeNetForm.CardExpYear.value=='')
			{ alert("Please enter your Card Expiration Year"); document.AuthorizeNetForm.CardExpYear.focus(); return false; }
			if(document.AuthorizeNetForm.cardVerify.value=='')
			{ alert("Please enter your Card Verification #"); document.AuthorizeNetForm.cardVerify.focus(); return false; }
			
			document.AuthorizeNetForm.submit();
		}


//check IMEI
var radio_selection="";
function  checkForm() {
	if (radioButtons() && textBox()) {
	return true;
	} else {
	return false;   
	}
}

function radioButtons() {
	if (radio_selection=="")
	alert("You must choose a Platform.");
	else {
	return true;
   }
}

function textBox()  {
	if (additem.IMEI.value=='') {
	alert("Please enter your IMEI Number"); additem.IMEI.focus(); return false;
	} else {
	return true;
   }
}

// -->
