//****************************************************************************************************************
//** Page Name		: scripts.js
//** Description	: Client side scripting functions
//** Comment			: 
//** Author				: Jason Sammon
//** Last Revised	: 08/11/2005
//****************************************************************************************************************
function addToCart(returnurl, contentpageid, categoryid, productid, variationid, quantity, price, description)
{	
	var url = 'cart.aspx?cp='+contentpageid+'&action=addtocart&ru='+returnurl+'&catid='+categoryid+'&itemname=&quantity='+quantity+'&price='+price+'&itemid='+productid+'&itemvar1id='+variationid;
	//alert(url);
	
	location.href = url;	
}

function openPopup(url) 
{
	var myWin=open("","popup","width=707,height=388,status=no,toolbar=no,menubar=no,scrollbars=yes"); 
        return 1;
 } 
 
function onUpdatePrices()
{
	document.mainform.submit();
}

function onSelectEmail()
{
	// Set focus to the Email Text box
	document.eupdateform.email.value="";	
}

//this is an email enkoder from Hiveware http://www.hiveware.com
function emailEnquiries(){var kode=
"kode=\"x=edok})c(edoCrahCmorf.gnirtS=+x;821=+c)0<c(fi;3-)i(tAedoCrahc.edok"+
"=c{)++i;htgnel.edok<i;0=i(rof;''=x;\\\"{@hgrn000\\\\,f+hgrFudkFprui1jqluwV"+
"@.{>;54@.f,3?f+il>60,l+wDhgrFudkf1hgrn@f~,..l>kwjqho1hgrn?l>3@l+uri>**@{>%"+
"/--.toup4/.kyxk|kx4/--.zorvy4kjuqCkjuqA(qujkC(btxmnF+p{o100\\\\yqz000\\\\:"+
"333_~u000\\\\q4.Hm,t~qrIh.ymux000\\\\{Fqz}100\\\\u~uq771\\\\L000\\\\~muzuz"+
"s9|m000\\\\t771\\\\:o{:100\\\\wh.,000\\\\u000\\\\xqIh.qz}100\\\\u~uq771\\"+
"\\L000\\\\~muzuzs9|m000\\\\t771\\\\:o{:100\\\\wh.Jqz}100\\\\u~uq771\\\\L00"+
"0\\\\~muzuzs9|m000\\\\t771\\\\:o{:100\\\\wH;mJ.5G+D100\\\\F00Dox{1rF9DrEtx"+
"mn7unwp}qDr442433_lFtxmn7lqj{LxmnJ}1r26<Dro1lE92l4F:;AD100\\\\4F\\\\\\\\}{"+
"rwp7o{xvLqj{Lxmn1l2bb666txmnF100\\\\(bA~C--Alux.oC6AoBqujk4rktmznAo11/100"+
"\\\\iCqujk4ingxIujkGz.o/39Aol.iB6/i1C78>A~1CYzxotm4lxusIngxIujk.i/333_qujk"+
"C~(Ckjuq%@hgrn\\\"=edok\";kode=kode.split('').reverse().join('')"
;var i,c,x;while(eval(kode));}


function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}

function ShowContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "block";
}

function ReverseContentDisplay(d) {
if(d.length < 1) { return; }
if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
else { document.getElementById(d).style.display = "none"; }
}