// JavaScript Document
function setColor(colorHex, colorName){
	document.Form1.txtColor.value = colorHex;
	document.Form1.txtColorName.value = colorName;
	document.Form1.txtColorInput.value = colorName;
}

function pickColor(theThis, colorName){
	theThis.style.cursor='pointer';
	theThis.title = colorName;
}

function pickFont(fontFile){
	document.Form1.txtFont.value = fontFile;
}

function addToCart2(){
	var qty = document.Form1.ppQty.value;
	var amt = document.Form1.ppAmount.value;
	var style = document.Form1.ppStyle.value;
	var phrase = document.Form1.ppPhrase.value;
	var instructions = document.Form1.ppInstructions.value;
	window.location = 'http://www.vinylinspirations.com/myCart.asp?qty=' + qty + '&style=' + style + '&phrase=' + phrase + '&amt=' + amt + '&instructions=' + instructions,'add_to_cart','width=0,height=0,top=0,left=0';
}

function addToCart(){
	var qty = document.Form1.ppQty.value;
	var amt = document.Form1.ppAmount.value;
	var style = document.Form1.ppStyle.value;
	var phrase = document.Form1.ppPhrase.value;
	var instructions = document.Form1.ppInstructions.value;
	var popUpWin = window.open('addtocart.asp?qty=' + qty + '&style=' + style + '&phrase=' + phrase + '&amt=' + amt + '&instructions=' + instructions,'add_to_cart','width=0,height=0,top=0,left=0');
	
	if(!popUpWin){
		alert('The shopping cart was unable to launch due to a pop-up blocker.' + "\n" + "\n" + 'The shopping cart uses pop-up windows which must be allowed for this site.' + "\n" + "\n" + 'If the "Allow This Site" message does not appear, refer to the help file in the popup blocker being used. Reference instructions to allow pop-ups for specific sites.');}
	else{
		window.opener = null;
		popUpWin.focus();
	}
}

function viewCart(){
	var popUpWin = window.open('viewCart.asp','viewCart','width=0,height=0,top=0,left=0');
	
	if(!popUpWin){
		alert('The shopping cart was unable to launch due to a pop-up blocker.' + "\n" + "\n" + 'The shopping cart uses pop-up 				windows which must be allowed for this site.' + "\n" + "\n" + 'If the "Allow This Site" message does not appear, refer to the help file in the popup blocker being used. Reference instructions to allow pop-ups for specific sites.');}
	else{
		window.opener = null;
		popUpWin.focus();
	}
}

function onFont(theThis){
	theThis.style.cursor = 'pointer';
}

function offFont(theThis){
}