var win = null;

function enlarge(image)
{
	win2=window.open('','win2','width=500,height=500,location=no,menubar=no,scrollbars=yes,resizable=yes');
	win2.focus();
	win2.document.open();
	win2.document.writeln('<HTML>');
	win2.document.writeln('<HEAD>');
	win2.document.writeln('<meta http-equiv="imagetoolbar" content="no">');
	win2.document.writeln('<TITLE>Shopping Cart</TITLE>');
	win2.document.writeln('</HEAD>');
	win2.document.write('<');
	win2.document.writeln('BODY topmargin="0" leftmargin="0">');
	win2.document.write('<p align="center"><img onclick="self.close();" title="Click to close window" onload = "if(popup.height<500)resizeTo(popup.width+28,popup.height+32);" name="popup" src="');
	win2.document.write(image);
	win2.document.writeln('"></p>');
	win2.document.writeln('</BODY>');
	win2.document.writeln('</HTML>');
	win2.document.close();
}

function info(text,i,p,w,id)
{
	win2=open('','win2','width=300,height=200,location=no,menubar=no,scrollbars=yes,resizable=yes');
	win2.focus();
	win2.document.open();
	win2.document.writeln('<HTML>');
	win2.document.writeln('<HEAD>');
	win2.document.writeln('<TITLE>Shopping Cart</TITLE>');
	win2.document.writeln('</HEAD>');
	win2.document.write('<');
	win2.document.writeln('BODY topmargin="0" leftmargin="0" onload="javascript:this.focus()">')
	win2.document.writeln('<font face="Arial" size="2">');
	win2.document.write(text);
	win2.document.writeln('<p><button style="font-size:10;background-color:#FF8000;color:#FFFFFF;"onclick="self.close();">Close</button></p>');
	win2.document.writeln('</font>');
	win2.document.writeln('</BODY>');
	win2.document.writeln('</HTML>');
	win2.document.close();
}

function round(number)
{
	return Math.round(number*Math.pow(10,2))/Math.pow(10,2);
}

function scan(cc_number)
{
	if (cc_number==null)
		cc_number = "";
	testc = 0;
	new_ccnumber = "";
	cclen = cc_number.length;
	if ((cc_number.indexOf("$") != -1) || (cc_number.indexOf("L") != -1) || (cc_number.indexOf("\u20ac") != -1))
	{
		startc = cc_number.indexOf("$")+1;
		if (startc==0)
			startc = cc_number.indexOf("L")+1;
		if (startc==0)
			startc = cc_number.indexOf("\u20ac")+1;

		for(n=startc;n<cclen;n++)
		{
			tc = cc_number.substring(n,n+1);
			if (tc == "0" || tc == "1" || tc == "2" ||tc == "3" || tc == "4" ||tc == "5" || tc == "6"  || tc == "7" || tc == "8" || tc == "9" || tc == "." )
				new_ccnumber = new_ccnumber + tc;
			else
				n = cclen;
		}
	}
	if (new_ccnumber == "")
		new_ccnumber=0;
	return new_ccnumber;
}

var gShowCart = false;

function fShowCart()
{
//	alert( "readystate = " + frmCart.readyState + ", gShowCart = " + gShowCart );
//	if ( frmCart.readyState == "complete" && gShowCart )
//	{
//		alert( "added item redirecting..." );
//		gShowCart = false;
//		window.location.href = "cart.html";
//	}

//	var x;
//	x = document.getElementById( "lnkCart" );
//	x.click();
//	alert( x );
//	alert( document.window );
//	alert( window.document );
	window.location = "cart.html";
}