// JavaScript Document

var w;
var H; var W;
var sH = screen.height;
var sW = screen.width;

var d = new Array("","Case of Green Tea","Case of Diet Green Tea","Case of Mandarin Orange","Case of Asia Plum", "Case of Pomegranate", "Case of No Carb Apple &amp; White Cranberry", "Case of Blueberry White Tea","Case with No Carb Green Teas", "Case with Mandarin/Asia Plum","Case with Pomegranate/Mandarin Orange","Case with Pomegranate/Asia Plum","Case with Four Green Teas");


var g = new Array("","green","diet","mandarin","plum","pome","apple","white","nocarbs","mand_plum","pome_mand","pome_plum","fourteas");

var t= new Array("","<br/>12 bottles of 591ml AriZona Green Tea","<br/>12 bottles of 591ml AriZona Diet Green Tea","<br/>12 bottles of 591ml AriZona Mandarin Orange Green Tea","<br/>12 bottles of 591ml AriZona Asia Plum Green Tea","<br/>12 bottles of 591ml AriZona Pomegranate Green Tea","<br/>12 bottles of 591ml AriZona<br/>No Carb Apple &amp; White Cranberry Green Tea","<br/>12 bottles of 591ml AriZona<br/>Blueberry White Tea","<br/>6 bottles of 591ml No Carb Apple &amp; White Cranberry<br/>6 bottles of 591ml No Carb Blueberry","<br/>6 bottles of 591ml Mandarin Orange<br/>6 bottles of 591ml Asia Plum","<br/>6 bottles of 591ml Pomegranate<br/>6 bottles of 591ml Mandarin Orange","<br/>6 bottles of 591ml Pomegranate<br/>6 bottles of 591ml Asia Plum","<br/>3 bottles of 591ml Green Tea, 3 bottles of 591ml Diet Green Tea,<br/>3 bottles of 591ml Mandarin Orange, 3 bottles of 591ml Asia Plum","<br/>12 bottles of 591ml Pomegranate Green Tea");

var n = new Array(null,0,0,0,0,0,0,0,0,0,0,0,0,0);
var p = new Array(null,20.28, 20.28, 20.28, 20.28,20.28, 20.28, 20.28, 21.48, 21.48, 21.48, 21.48, 21.48);
var delivery = 4.95;
var total=0;

var preload= new Array(12);

for(N=1;N<=12;N++)
{
preload[N]=new Image();
preload[N].src="image/bottle/small/on/"+g[N]+'.gif';
}

function hi(i)
{
	document.images["i"+i].src='image/bottle/small/on/'+g[i]+'.gif';
	document.getElementById("c"+i).style.backgroundColor="#ffffee";
}

function lo(i)
{
if(n[i]==0)
{
document.images["i"+i].src='image/bottle/small/off/'+g[i]+'.gif';
	document.getElementById("c"+i).style.backgroundColor="";}

}


 

function init()
{
if( typeof( window.innerWidth ) == 'number' ) {
  H = window.innerHeight; W=window.innerWidth;
 } else if( document.documentElement &&
   ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
  H = document.documentElement.clientHeight;W=document.documentElement.clientWidth;
 } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
  H = document.body.clientHeight;W=document.body.clientHeight
 }
	with(document.getElementById('box').style)
	{
		if(sH<768){top=4+"px";marginTop=4+"px"}
		if(sW<1024){left=4+"px";marginLeft=4+"px"}
	}
scrollBanner();
}


function pop(i)
{

		

		var TITLE=d[i];
		var PIC='<img id="case" src="image/case/'+g[i]+'.gif"/>';
		var TEXT="<b>contains the following: </b><span style='font-size:10px'>"+t[i]+"</span>";
		var PRICES="<b>Price:</b> &pound;"+p[i]+"&nbsp;&nbsp;&nbsp;&nbsp;<b>Delivery:</b> &pound;4.95";

		var height=270;
		if(i>7){height+=35};
		
		clean();

		
		var left=sW-340
		var top=(sH-H-80);
		
		if(left>610){left=610}
		if(top<0){top=5}
		

	w=window.open('','AriZona','directories=no,height='+height+',width=330,left='+left+'px,top='+top+'px;location=no,menubar=no,resizeable=no,scrollbars=no,status=no,titlebar=no,toolbar=no,alwaysRaised=true'); 
	

			 var html='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/><title>AriZona</title><script src="script/pop.js" type="text/javascript"></script><link href="style/pop.css" rel="stylesheet" type="text/css"/></head><body><div id="title">'+TITLE+'</div><div id="pic">'+PIC+'<input id="add" type="button" value="Add Case" onclick="add('+i+')"/><input id="remove" type="button" value="Remove" onclick="remove('+i+')"/><input id="close" type="button" value="Close" onclick="self.close();"/><div id="text">'+TEXT+'</div><div id="prices"><div style="margin-top:5px">'+PRICES+'</div></div></body></html>'; 
			
		
		
	w.document.write(html); 

		}
		
function clean()
{
try{
if(typeof(w)=='object'){
if(!w.closed){w.close();}}
}
catch(e){w=null;}
}

