//-----------------------------------------------------------------------


	function parentwidth()
    {
			if( parent.window.innerWidth )
            {
				return parent.window.innerWidth;
            }
            else if( parent.document.body.clientWidth )
				{
				return parent.document.body.clientWidth; 
				}
			else
				{
				return parseInt(screen.width*.8);
				}
	}


	function parentheight()
    {
			if( parent.window.innerHeight )
            {
				return parent.window.innerHeight;
            }
            else if( parent.document.body.clientHeight )
				{
				return parent.document.body.clientHeight; 
				}
			else
				{
				return parseInt(screen.height*.8);
				}
	}


//-----------------------------------------------------------------------


		function navmenu(victim)
		{
			parent.document.getElementById('intro').src 		= "images/intro_off.jpg";
			parent.document.getElementById('port').src 			= "images/port_off.jpg";
			parent.document.getElementById('order').src 		= "images/order_off.jpg";
			parent.document.getElementById('cont').src 			= "images/cont_off.jpg";

			if(victim != "nil")
			{
			parent.document.getElementById(victim).src 			= "images/"+victim+"_on.jpg";
			}
		}
		
		
//-----------------------------------------------------------------------


		function zoomimage(victim, name)
		{
			var v3 = document.getElementById(victim).src;
			var v4 = new RegExp('_v','gi');
			var v5 = v3.replace(v4, '_z');

			var w1 = 790;
			var w2 = eval(parentwidth()-w1)/2;

			var h1 = 500;
			var h2 = eval(parentheight()-h1)/2;

		var zwin = window.open("", "ZoomView" ,"left="+w2+", top="+h2+", width="+w1+", height="+h1+",\
		 scrollbars, resizable");
		zwin.document.open("text/html", "replace");
		zwin.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\
		<html><head>\
		<title> (Zoom View of "'+name+'" - Product Code : '+victim+ ') </title>\
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\
		<link href="sunflowers1.css" rel="stylesheet" type="text/css"></head>\
		<body bgcolor="#111111" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"\
		 onLoad="window.focus();">\
		 <table width="100%" height="100%" cellpadding="0" cellspacing="0">\
		 <tr><td align="center" valign="middle">\
		 <img src="'+v5+'" style="border: solid 2px #AA8866">\
		 </td></tr></table>\
		 </body></html>');
		zwin.document.close();

		}


//-----------------------------------------------------------------------


		function order(id)
		{

			var w1 = 550;
			var w2 = eval(parentwidth()-w1)/2;

			var h1 = 550;
			var h2 = eval(parentheight()-h1)/2;

			var owin = window.open("page_order1_test.php?item_id="+id,"order1","left="+w2+",top="+h2+",\
								width="+w1+",height="+h1+",scrollbars,resizable");
		 	owin.focus();

		}


//-----------------------------------------------------------------------


		function check_card_details(value)
		{
			if(value == 'none')
			{
				document.getElementById('card_details').style.display = "none";
			}
			else
			{
				document.getElementById('card_details').style.display = "block";
			}

		}


// --------------------  That's all she wrote pal.-----------------------
