var bigimgloaded=0;
var runOnce=true;
function grabobj(objname) // v1.0
{
	return $(objname);
}

function $(objname)
{
	if (document.getElementById) return document.getElementById(objname);
	if (document.all) return document.all[objname];
	if (document.layers) return document.layers[objname];
}
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function remove(textfieldname)
{
	grabobj(textfieldname).value=0;
	grabobj("formv").submit();
}



function mouseX(evt) {
if (evt.pageX) return evt.pageX;
else if (evt.clientX)
   return evt.clientX + (document.documentElement.scrollLeft ?
   document.documentElement.scrollLeft :
   document.body.scrollLeft);
else return null;
}
function mouseY(evt) {
if (evt.pageY) return evt.pageY;
else if (evt.clientY)
   return evt.clientY + (document.documentElement.scrollTop ?
   document.documentElement.scrollTop :
   document.body.scrollTop);
else return null;
}

var hoveredOffImages=false;

var boxRad=30;

var thumbimageWidth;
var thumbimageHeight;
var bigimageWidth;
var bigimageHeight;
var firstmouseover=false;

function initbigimage()
{
	grabobj("bigimagebox").style.display='';
	grabobj("originalimg").style.display="none";
	grabobj("bigimagediv").style.left="0px";
	grabobj("bigimagediv").style.top="0px";

	thumbimageWidth=grabobj("bigimagethumb").width;
	thumbimageHeight=grabobj("bigimagethumb").height;

	bigimageWidth=grabobj("bigimageimg").width;
	bigimageHeight=grabobj("bigimageimg").height;

	thumbimageWidth=100;
	thumbimageHeight=100;
	bigimageWidth=800;
	bigimageHeight=800;

	boxRadX=(thumbimageWidth/(bigimageWidth/300))/2;
	boxRadY=(thumbimageWidth/(bigimageWidth/300))/2;
	
	grabobj("bigimagebox").style.width=(boxRadX*2)+"px";
	grabobj("bigimagebox").style.height=(boxRadY*2)+"px";
	grabobj("product_larger").style.display='none';

	var gbmx=40;
	var gbmy=40;
	var scale=(bigimageWidth)/thumbimageWidth;
	var bigX=gbmx*scale;
	var bigY=gbmy*scale;
	
	grabobj("bigimageimg").style.left=(bigX-bigX-bigX)+"px";
	grabobj("bigimageimg").style.top=(bigY-bigY-bigY)+"px";	

	grabobj("bigimagebox").style.left=(getoffsetthumbimageX()+gbmx)+"px";
	grabobj("bigimagebox").style.top=(getoffsetthumbimageY()+gbmy)+"px";

	grabobj("bigimagebox").style.display="";
	grabobj("bigimageimg").style.display="";
	grabobj("bigimagediv").style.display="";

	firstmouseover=false;
	grabobj("bigimagebox").onmouseover=function () { hoveredOffImages=false; }
	grabobj("bigimagethumb").onmouseover=function () { firstmouseover=true;hoveredOffImages=false; }
	grabobj("bigimageimg").onmouseover=function () { hoveredOffImages=false; }

	grabobj("bigimagethumb").onmouseout=bigimagethumbout;
	grabobj("bigimageimg").onmouseout=bigimageimgout;

	bigimgloaded=1;
}
function bigimagethumbout()
{
	hoveredOffImages=true;
	setTimeout(checkHover,10);
}
function bigimageimgout()
{
	hoveredOffImages=true;
	setTimeout(checkHover,10);
}
function checkHover()
{
	if (hoveredOffImages & firstmouseover)
	{
		grabobj("originalimg").style.display="";
		hoveredOffImages=false;
		grabobj("imgloading").innerHTML="<a href=\"javascript:enlargeimage();\">Click For Larger Image</a>";
		grabobj("product_larger").style.display='';
		grabobj("bigimagebox").style.display='none';
	}
}

function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
		}
	}
	return [curleft,curtop];
}
function getoffsetthumbimageX()
{
	return findPos(grabobj("bigimagethumb"))[0];
}
function getoffsetthumbimageY()
{
	return findPos(grabobj("bigimagethumb"))[1];
}

function mouseMove(e)
{

if(!e) e=event;


if (bigimgloaded==1)
{
if (firstmouseover)
{
	var xVal=mouseX(e)-getoffsetthumbimageX();
	var yVal=mouseY(e)-getoffsetthumbimageY();
	
	var overImage=false;

	if (xVal>0 & xVal<(thumbimageWidth) & yVal>0 & yVal<(thumbimageHeight)) overImage=true;
	

	if (!overImage) return;

	
	var newX=mouseX(e);
	var newY=mouseY(e);


	var modifyX=0;
	var modifyY=0;

	if((newX-thumbimageWidth-getoffsetthumbimageX()+boxRadX)>0)
	{
		modifyX=(newX-thumbimageWidth-getoffsetthumbimageX()+boxRadX);
	}
	if((newY-thumbimageHeight-getoffsetthumbimageY()+boxRadY)>0)
	{
		modifyY=(newY-thumbimageHeight-getoffsetthumbimageY()+boxRadY);
	}

	if((newX-boxRadX-getoffsetthumbimageX())<0)
	{
		modifyX=(newX-boxRadX-getoffsetthumbimageX());
	}

	if((newY-boxRadY-getoffsetthumbimageY())<0)
	{
		modifyY=(newY-boxRadY-getoffsetthumbimageY());
	}
	newX=newX-boxRadX-modifyX;
	newY=newY-boxRadY-modifyY;

	
	grabobj("bigimagebox").style.left=newX+"px";
	grabobj("bigimagebox").style.top=newY+"px";
	

	var scale=(bigimageWidth)/thumbimageWidth;

	var bigX=(newX-getoffsetthumbimageX())*scale;
	var bigY=(newY-getoffsetthumbimageY())*scale;
	
	grabobj("bigimageimg").style.left=(bigX-bigX-bigX)+"px";
	grabobj("bigimageimg").style.top=(bigY-bigY-bigY)+"px";	

}
}

}
function enlargeimage (prodname,stno)
{
	var html='';
	
	html="<div style='width:482px;';><p style=\"margin-bottom:5px;\"><img src=\""+bigimage+"\" width=\"482\" height=\"482\" style=\"border:3px solid #666;\"></p>";
	html+="<h2 class=\"white\">"+prodname+"</h2>";
	if (grabobj("product_rrp")) html+="<div id=\"product_rrp\" style=\"width:100px;\">"+grabobj("product_rrp").innerHTML+"</div>";
	html+="<div id=\"product_price\" style=\"width:100px;\">"+grabobj("product_price").innerHTML+"</div>";
	var basketcode=grabobj("menu4").innerHTML
	dispbasket=basketcode.replace(/basket.jpg/, "basket-large.gif");
	html+="<div style=\"width:233px; float:right; padding-top:10px; color:#fff;\">"+dispbasket+"</div>";
	html+="<div style=\"width:482px; text-align:right; float:left;\"><a href=\"#\" onclick=\"clearItem('bigimg');\"><img src=\"/csp/vin/cr/images/misc/close.gif\" border=\"0\" vspace=\"5\" alt=\"Close Viewport\"></a></div>";
	html+="</div>";
	displayBox('bigimg',html,"#000000");
	//grabobj("imgloading").innerHTML="Loading...";	
	//grabobj("bigimageimg").src=bigimage+"?"+Math.floor(Math.random()*999999);
	//grabobj("bigimageimg").onload = function () { initbigimage(); }
}

function displayProdTypeInfo()
{
	var html="";
	
	html+="<div style='width:482px; color:#fff; margin-top:100px;';>"
	html+=grabobj("prodtypeinfo").innerHTML
	if (grabobj("product_rrp")) html+="<div id=\"product_rrp\" style=\"width:100px;\">"+grabobj("product_rrp").innerHTML+"</div>";
	html+="<div id=\"product_price\" style=\"width:100px;\">"+grabobj("product_price").innerHTML+"</div>";
	var basketcode=grabobj("menu4").innerHTML
	dispbasket=basketcode.replace(/basket.jpg/, "basket-large.gif");
	html+="<div style=\"width:233px; float:right; padding-top:10px; color:#fff;\">"+dispbasket+"</div>";
	html+="<div style=\"width:482px; text-align:right; float:left;\"><a href=\"#\" onclick=\"clearItem('bigimg');\"><img src=\"/csp/vin/cr/images/misc/close.gif\" border=\"0\" vspace=\"5\" alt=\"Close Viewport\"></a></div>";
	html+="</div>";
	displayBox('bigimg',html,"#000000");
}

function tabsShow(tab,obj)
{
	grabobj("product_tabs_"+tab).className="producttabon";
	grabobj(obj).style.display='block';
}
function tabsHide(tab,obj)
{
	grabobj("product_tabs_"+tab).className="producttaboff";
	grabobj(obj).style.display='none';
}
function prodInfoDiv(obj,pid)
{
	grabobj("prodinfo"+pid).style.display='block';
	grabobj("prodinfoimg"+pid).style.border='3px solid #9ECBE9';
	grabobj("prodinfoposition").style.display='';
	grabobj("prodinfoposition").style.left=(findPos(obj)[0])+4+"px";
	grabobj("prodinfoposition").style.top=(findPos(obj)[1]-110)+"px";
}
function prodInfoHide(pid)
{
 if (grabobj("prodinfoimg"+pid).className!="hlprodf")
 {
	grabobj("prodinfoimg"+pid).style.border='3px solid #999';
 } else {
	grabobj("prodinfoimg"+pid).style.border='3px solid #BE1B75';
 }
 grabobj("prodinfoposition").style.display='none';
 grabobj("prodinfo"+pid).style.display='none';
}

var sbcoltimer;
var topmenutimer;
var colMenuOpen=false;




function sbcolDisplay(obj,pid)
{
	colMenuOpen=true;
	clearTimeout(sbcoltimer);
	for (var i=1;i<13;i++)
	{
		grabobj("sbcolinfo"+i).style.display='none';
	}
	grabobj("sbcolinfo"+pid).style.display='';
	grabobj("sbcolposition").style.display='';
	if (obj)
	{

		grabobj("sbcolposition").style.top=(findPos(obj)[1]+16)+"px";

		var temp=((grabobj("sbcolinfo"+pid).offsetWidth)+(findPos(obj)[0]-findPos(grabobj("wrapper"))[0]))
	
		if (temp<850)
		{
			grabobj("sbcolposition").style.left=findPos(obj)[0]+"px";
		} else {
			grabobj("sbcolposition").style.left=(findPos(obj)[0]-(temp-840))+"px";
		}
	}
}

function sbcolHide(pid)
{
	sbcoltimer=setTimeout(sbcolHide2,200);
}
function sbcolHide2()
{
	overDropBox=false;
	colMenuOpen=false;
	for (var i=1;i<10;i++)
	{
		grabobj("sbcolinfo"+i).style.display='none';
	}
	grabobj("sbcolposition").style.display='none';
}

function topmenuDisplay(obj,pid)
{
	clearTimeout(topmenutimer);
	for (var i=1;i<6;i++)
	{
		grabobj("topmenuinfo"+i).style.display='none';
	}

	grabobj("topmenuinfo"+pid).style.display='';
	grabobj("topmenuposition").style.display='';

	if (obj) {

		grabobj("topmenuposition").style.top=(findPos(obj)[1]+16)+"px";

		var temp=((grabobj("topmenuinfo"+pid).offsetWidth)+(findPos(obj)[0]-findPos(grabobj("wrapper"))[0]));
	
		if (temp<850)
		{
			grabobj("topmenuposition").style.left=findPos(obj)[0]+"px";
		} else {
			grabobj("topmenuposition").style.left=(findPos(obj)[0]-(temp-840))+"px";
		}
	}
}

function topmenuHide(pid)
{
	topmenutimer=setTimeout(topmenuHide2,200);
}
function topmenuHide2()
{
	for (var i=1;i<6;i++)
	{
		grabobj("topmenuinfo"+i).style.display='none';
	}
	grabobj("topmenuposition").style.display='none';
}
function crinit()
{
	document.onmousemove=mouseMove;
}
function emailFriend()
{
	displayBox("email",$("emailfriend_html").innerHTML);
}
function searchBox()
{
	displayBox("searchbox",$("searchbox_html").innerHTML);
}

function retrieveData (cmd)
{
 var method="GET"
 if (typeof(cmd)!="undefined") 
 {
	method="POST"
 	if (IsNumeric(cmd)) method="GET"
 }
 if (runOnce)
 {
	runOnce=false;
	var xmlHttpReq;
	try { xmlHttpReq=new XMLHttpRequest(); } catch (e) {
		try { xmlHttpReq=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {
			try { xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {
	}	}	}

	var url='/csp/vin/cr/ajaxProduct.csp'
	xmlHttpReq.open(method, url, true);
	xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlHttpReq.onreadystatechange = function() {
        if (xmlHttpReq.readyState == 4) {



		
		
		if (xmlHttpReq.responseText)
		{	
	
		try
		  {
			eval(xmlHttpReq.responseText);
			runOnce=true;
			
		  }
		catch(err)
		  {
			
		  }
			
			

			
		}
	}
	}
	xmlHttpReq.send(cmd);
 }
}
function retrieveCmd (cmd)
{
	var xmlHttpReq;
	try { xmlHttpReq=new XMLHttpRequest(); } catch (e) {
		try { xmlHttpReq=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {
			try { xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {
	}	}	}

	var url='/csp/vin/cr/ajaxCmd.csp';
	xmlHttpReq.open('POST', url, true);
	xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlHttpReq.onreadystatechange = function() {
        if (xmlHttpReq.readyState == 4) {

		if (xmlHttpReq.responseText)
		{	
	
		try
		  {
			eval(xmlHttpReq.responseText);
		  }
		catch(err)
		  {
		  }
		}
	}
	}
	xmlHttpReq.send(cmd);
}

function IsNumeric(sText)
{
   var ValidChars = "0123456789";
   var IsNumber=true;
   var Char;
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
}
function displayImage (ref)
{
	var html="<p><img src=\"/csp/vin/cr/products/482/"+ref+".jpg\" width=\"482\" height=\"482\"></p>";
	html+="<p><input type=\"button\" value=\"Close\" class=\"normaltxt\" onclick=\"clearItem('"+ref+"');\"></p>";
	displayBox(ref,html);
}











function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


function displayVid (contenturl)
{
var html='';
html+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="518" height="300">';
html+='<param name="movie" value="http://content.screencast.com/bootstrap.swf"></param>';
html+='<param name="quality" value="high"></param> <param name="bgcolor" value="#000000"></param>';
html+='<param name="flashVars" value="content='+contenturl+'&width=518&height=300"></param> <param name="allowFullScreen" value="true"></param>';
html+='<param name="scale" value="showall"></param>';
html+='<param name="allowScriptAccess" value="always"></param>';
html+='<embed src="http://content.screencast.com/bootstrap.swf" quality="high" bgcolor="#000000" width="518" height="300" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="content='+contenturl+'&width=518&height=300" allowFullScreen="true" scale="showall"></embed>';
html+='</object>';
html+='<div align=\"center\"><a href=\"#\" onclick=\"clearItem(\'bigimg\');\"><img src=\"/csp/vin/cr/images/misc/close.gif\" border=\"0\" vspace=\"5\" alt=\"Close Viewport\"></a></div>';



displayBox('bigimg',html);


}



function watchVideo (contenturl)
{
var html='';
html+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="480" height="360">';
html+='<param name="movie" value="http://content.screencast.com/flvplayer.swf"></param>';
html+='<param name="quality" value="high"></param>';
html+='<param name="bgcolor" value="#FFFFFF"></param>';
html+='<param name="flashVars" value="thumb=http://content.screencast.com/media/6a6b9b38-8853-4a1c-a66a-89695781c3bc_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_Thumbnail.gif&content=http://content.screencast.com/media/0ab2878e-025a-45d8-b88c-f41131fb3536_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_Fruit Trees last.flv&width=480&height=360"></param>';
html+='<param name="allowFullScreen" value="true"></param>';
html+='<param name="scale" value="showall"></param>';
html+='<param name="allowScriptAccess" value="always"></param>';
html+='<embed src="http://content.screencast.com/flvplayer.swf" quality="high" bgcolor="#FFFFFF" width="480" height="360" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/media/6a6b9b38-8853-4a1c-a66a-89695781c3bc_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_Thumbnail.gif&content=http://content.screencast.com/media/0ab2878e-025a-45d8-b88c-f41131fb3536_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_Fruit Trees last.flv&width=480&height=360" allowFullScreen="true" scale="showall"></embed>';
html+='</object>';
html+='<div align=\"center\"><br /><input type=\"button\" value=\"Close Viewport\" onclick=\"clearItem(\'bigimg\');\"></div>';

displayBox('bigimg',html);
}

function watchVideo2saved090508 (contenturl)
{
var html='';
html+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="320" height="240">';
html+='<param name="movie" value="http://content.screencast.com/flvplayer.swf"></param>';
html+='<param name="quality" value="high"></param>';
html+='<param name="bgcolor" value="#FFFFFF"></param> ';
html+='<param name="flashVars" value="thumb=http://content.screencast.com/media/eecce55c-31aa-4a59-85d3-27cdca1bab5a_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_Thumbnail.gif&content=http://content.screencast.com/media/17c6a4c9-ff14-470a-9c3d-18c5af9376b6_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_Tomato Hundreds and Thousand.flv&width=320&height=240"></param>';
html+='<param name="allowFullScreen" value="true"></param>';
html+='<param name="scale" value="showall"></param>';
html+='<param name="allowScriptAccess" value="always"></param>';
html+='<embed src="http://content.screencast.com/flvplayer.swf" quality="high" bgcolor="#FFFFFF" width="320" height="240" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/media/eecce55c-31aa-4a59-85d3-27cdca1bab5a_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_Thumbnail.gif&content=http://content.screencast.com/media/17c6a4c9-ff14-470a-9c3d-18c5af9376b6_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_Tomato Hundreds and Thousand.flv&width=320&height=240" allowFullScreen="true" scale="showall"></embed>';
html+='</object>';
html+='<div align=\"center\"><br /><input type=\"button\" value=\"Close Viewport\" onclick=\"clearItem(\'bigimg\');\"></div>';

displayBox('bigimg',html);
}

function watchVideo2 (contenturl)
{
var html='';
html+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="480" height="396">';
html+='<param name="movie" value="http://content.screencast.com/bootstrap.swf"></param>';
html+='<param name="quality" value="high"></param>';
html+='<param name="bgcolor" value="#FFFFFF"></param> ';
html+='<param name="flashVars" value="content=http://content.screencast.com/media/f2c786c9-a51e-4e8e-b70b-571b3eed43f5_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_GardenBargains2.com Hundreds and Thousands.swf&width=480&height=396"></param>';
html+='<param name="allowFullScreen" value="true"></param>';
html+='<param name="scale" value="showall"></param>';
html+='<param name="allowScriptAccess" value="always"></param>';
html+='<embed src="http://content.screencast.com/bootstrap.swf" quality="high" bgcolor="#FFFFFF" width="480" height="396" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="content=http://content.screencast.com/media/f2c786c9-a51e-4e8e-b70b-571b3eed43f5_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_GardenBargains2.com Hundreds and Thousands.swf&width=480&height=396" allowFullScreen="true" scale="showall"></embed>';
html+='</object>';
html+='<div align=\"center\"><br /><input type=\"button\" value=\"Close Viewport\" onclick=\"clearItem(\'bigimg\');\"></div>';

displayBox('bigimg',html);
}

function watchVideo3 (contenturl)
{
var html='';
html+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="320" height="240">';
html+='<param name="movie" value="http://content.screencast.com/flvplayer.swf"></param>';
html+='<param name="quality" value="high"></param>';
html+='<param name="bgcolor" value="#FFFFFF"></param>';
html+='<param name="flashVars" value="thumb=http://content.screencast.com/media/e1c09e80-28c5-4880-9d72-b986c8ab2716_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_Thumbnail.gif&content=http://content.screencast.com/media/2025a052-ee8b-4146-b5c9-96266f7f11a1_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_Big Moss A.flv&width=320&height=240"></param>';
html+='<param name="allowFullScreen" value="true"></param>';
html+='<param name="scale" value="showall"></param>';
html+='<param name="allowScriptAccess" value="always"></param>';
html+='<embed src="http://content.screencast.com/flvplayer.swf" quality="high" bgcolor="#FFFFFF" width="320" height="240" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/media/e1c09e80-28c5-4880-9d72-b986c8ab2716_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_Thumbnail.gif&content=http://content.screencast.com/media/2025a052-ee8b-4146-b5c9-96266f7f11a1_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_Big Moss A.flv&width=320&height=240" allowFullScreen="true" scale="showall"></embed> ';
html+='</object>';
html+='<div align=\"center\"><br /><input type=\"button\" value=\"Close Viewport\" onclick=\"clearItem(\'bigimg\');\"></div>';

displayBox('bigimg',html);
}

function watchVideo3new (contenturl)
{
var html='';
html+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="480" height="396">';
html+='<param name="movie" value="http://content.screencast.com/flvplayer.swf"></param>';
html+='<param name="quality" value="high"></param>';
html+='<param name="bgcolor" value="#FFFFFF"></param>';
html+='<param name="flashVars" value="content=http://content.screencast.com/media/2f25f71d-4599-433e-8c89-46c76b5da723_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_GardenBargains.com Big Moss3.swf&width=480&height=396"></param>';
html+='<param name="allowFullScreen" value="true"></param>';
html+='<param name="scale" value="showall"></param>';
html+='<param name="allowScriptAccess" value="always"></param>';
html+='<embed src="http://content.screencast.com/bootstrap.swf" quality="high" bgcolor="#FFFFFF" width="480" height="396" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="content=http://content.screencast.com/media/2f25f71d-4599-433e-8c89-46c76b5da723_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_GardenBargains.com Big Moss3.swf&width=480&height=396" allowFullScreen="true" scale="showall"></embed>';
html+='</object>';
html+='<div align=\"center\"><br /><input type=\"button\" value=\"Close Viewport\" onclick=\"clearItem(\'bigimg\');\"></div>';

displayBox('bigimg',html);
}

function watchVideo4saved090508 (contenturl)
{
var html='';
html+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="480" height="360">';
html+='<param name="movie" value="http://content.screencast.com/bootstrap.swf"></param>';
html+='<param name="quality" value="high"></param>';
html+='<param name="bgcolor" value="#FFFFFF"></param>';
html+='<param name="flashVars" value="content=http://content.screencast.com/media/688f3b10-4bfe-4852-abdc-187985206b98_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_sweet pea final export 4-3.swf&width=480&height=360"></param>';
html+='<param name="allowFullScreen" value="true"></param>';
html+='<param name="scale" value="showall"></param>';
html+='<param name="allowScriptAccess" value="always"></param>';
html+='<embed src="http://content.screencast.com/bootstrap.swf" quality="high" bgcolor="#FFFFFF" width="480" height="360" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="content=http://content.screencast.com/media/688f3b10-4bfe-4852-abdc-187985206b98_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_sweet pea final export 4-3.swf&width=480&height=360" allowFullScreen="true" scale="showall"></embed>';
html+='</object>';
html+='<div align=\"center\"><br /><input type=\"button\" value=\"Close Viewport\" onclick=\"clearItem(\'bigimg\');\"></div>';

displayBox('bigimg',html);
}

function watchVideo4 (contenturl)
{
var html='';
html+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="480" height="396">';
html+='<param name="movie" value="http://content.screencast.com/bootstrap.swf"></param>';
html+='<param name="quality" value="high"></param>';
html+='<param name="bgcolor" value="#FFFFFF"></param>';
html+='<param name="flashVars" value="content=http://content.screencast.com/media/c0607a71-18d6-44f5-99c3-e5908505dacf_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_GardenBargains.com Sweet Pea Offer.swf&width=480&height=396"></param>';
html+='<param name="allowFullScreen" value="true"></param>';
html+='<param name="scale" value="showall"></param>';
html+='<param name="allowScriptAccess" value="always"></param>';
html+='<embed src="http://content.screencast.com/bootstrap.swf" quality="high" bgcolor="#FFFFFF" width="480" height="396" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="content=http://content.screencast.com/media/c0607a71-18d6-44f5-99c3-e5908505dacf_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_GardenBargains.com Sweet Pea Offer.swf&width=480&height=396" allowFullScreen="true" scale="showall"></embed>';
html+='</object>';
html+='<div align=\"center\"><br /><input type=\"button\" value=\"Close Viewport\" onclick=\"clearItem(\'bigimg\');\"></div>';

displayBox('bigimg',html);
}




function watchVideo4 (contenturl)
{
var html='';
html+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="480" height="396">';
html+='<param name="movie" value="http://content.screencast.com/bootstrap.swf"></param>';
html+='<param name="quality" value="high"></param>';
html+='<param name="bgcolor" value="#FFFFFF"></param>';
html+='<param name="flashVars" value="content=http://content.screencast.com/media/c0607a71-18d6-44f5-99c3-e5908505dacf_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_GardenBargains.com Sweet Pea Offer.swf&width=480&height=396"></param>';
html+='<param name="allowFullScreen" value="true"></param>';
html+='<param name="scale" value="showall"></param>';
html+='<param name="allowScriptAccess" value="always"></param>';
html+='<embed src="http://content.screencast.com/bootstrap.swf" quality="high" bgcolor="#FFFFFF" width="480" height="396" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="content=http://content.screencast.com/media/c0607a71-18d6-44f5-99c3-e5908505dacf_03e12061-f73b-449f-aa4d-52ccd36e7d7e_static_0_0_GardenBargains.com Sweet Pea Offer.swf&width=480&height=396" allowFullScreen="true" scale="showall"></embed>';
html+='</object>';
html+='<div align=\"center\"><br /><input type=\"button\" value=\"Close Viewport\" onclick=\"clearItem(\'bigimg\');\"></div>';

displayBox('bigimg',html);
}

function watchVideo5 (contenturl)
{
var html='';
html+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="540" height="576">';
html+='<param name="movie" value="http://content.screencast.com/bootstrap.swf"></param>';
html+='<param name="quality" value="high"></param>';
html+='<param name="bgcolor" value="#FFFFFF"></param>';
html+='<param name="flashVars" value="content=http://content.screencast.com/media/99109d72-9fa8-4f9e-bef5-461af5cfc350_efd3a355-c189-473c-9f13-f65d23909d59_static_0_0_Citrus%20Trees%20160508.swf&width=540&height=576"></param>';
html+='<param name="allowFullScreen" value="true"></param>';
html+='<param name="scale" value="showall"></param>';
html+='<param name="allowScriptAccess" value="always"></param>';
html+='<embed src="http://content.screencast.com/bootstrap.swf" quality="high" bgcolor="#FFFFFF" width="540" height="576" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="content=http://content.screencast.com/media/99109d72-9fa8-4f9e-bef5-461af5cfc350_efd3a355-c189-473c-9f13-f65d23909d59_static_0_0_Citrus%20Trees%20160508.swf&width=540&height=576" allowFullScreen="true" scale="showall"></embed>';
html+='</object>';
html+='<div align=\"center\"><br /><input type=\"button\" value=\"Close Viewport\" onclick=\"clearItem(\'bigimg\');\"></div>';

displayBox('bigimg',html);
}

function watchVideo6 (contenturl)
{
var html='';
html+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="480" height="396">';
html+='<param name="movie" value="http://content.screencast.com/bootstrap.swf"></param>';
html+='<param name="quality" value="high"></param>';
html+='<param name="bgcolor" value="#FFFFFF"></param>';
html+='<param name="flashVars" value="content=http://content.screencast.com/media/2e1e2d58-9be9-4ee9-98f3-b82c259880cf_efd3a355-c189-473c-9f13-f65d23909d59_static_0_0_Free%20Apple%20tree%20160508.swf&width=480&height=396"></param> ';
html+='<param name="allowFullScreen" value="true"></param>';
html+='<param name="scale" value="showall"></param>';
html+='<param name="allowScriptAccess" value="always"></param>';
html+='<embed src="http://content.screencast.com/bootstrap.swf" quality="high" bgcolor="#FFFFFF" width="480" height="396" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="content=http://content.screencast.com/media/2e1e2d58-9be9-4ee9-98f3-b82c259880cf_efd3a355-c189-473c-9f13-f65d23909d59_static_0_0_Free%20Apple%20tree%20160508.swf&width=480&height=396" allowFullScreen="true" scale="showall"></embed>';
html+='</object>';
html+='<div align=\"center\"><br /><input type=\"button\" value=\"Close Viewport\" onclick=\"clearItem(\'bigimg\');\"></div>';

displayBox('bigimg',html);
}

function watchHtmVideoHO (contentfile)
{
var html='';
html+='<iframe src="/csp/etail/aspect2/video/'+contentfile+'.htm" style="width:644px;height:486px;"></iframe>';
html+='<div align=\"center\"><br /><input type=\"button\" value=\"Close Viewport\" onclick=\"clearItem(\'bigimg\');\"></div>';
displayBox('bigimg',html);
}
function watchHtmVideoSM (contentfile)
{
var html='';
html+='<iframe src="/csp/etail/aspect2/video/'+contentfile+'.htm" style="width:546px;height:486px;"></iframe>';
html+='<div align=\"center\"><br /><input type=\"button\" value=\"Close Viewport\" onclick=\"clearItem(\'bigimg\');\"></div>';
displayBox('bigimg',html);
}




function ajaxObject(url, callbackFunction)
{

  var that=this;      
  this.updating = false;
  this.abort = function() {
    if (that.updating) {
      that.updating=false;
      that.AJAX.abort();
      that.AJAX=null;
    }
  }
  this.update = function(passData,postMethod) { 
    if (that.updating) { return false; }
    that.AJAX = null;                          
    if (window.XMLHttpRequest) {              
      that.AJAX=new XMLHttpRequest();              
    } else {                                  
      that.AJAX=new ActiveXObject("Microsoft.XMLHTTP");
    }                                             
    if (that.AJAX==null) {                             
      return false;                               
    } else {
      that.AJAX.onreadystatechange = function() {  
        if (that.AJAX.readyState==4) {             
          that.updating=false;
          that.callback(that.AJAX.responseText,that.AJAX.status,that.AJAX.responseXML);        
          that.AJAX=null;                                         
        }                                                      
      }                                                        
      that.updating = new Date();        
	  
	  if ($('ajaxcall')) $('ajaxcall').innerHTML=new Date();
      if (/post/i.test(postMethod)) {
        var uri=urlCall+'?'+that.updating.getTime();
        that.AJAX.open("POST", uri, true);
        that.AJAX.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        that.AJAX.send(passData);
      } else {
        var uri=urlCall+'?'+passData+'&stamp='+(that.updating.getTime()); 
        that.AJAX.open("GET", uri, true);                             
        that.AJAX.send(null);                                         
      }              
      return true;                                             
    }
  }
  var urlCall = url;
  this.callback = callbackFunction || function () { };
}
function evalAjax (t,s)
{	
	eval(t);	
}
function toggleLine (id)
{
	var i=1;
	while ($('optionsline'+i))
	{
		if (id!=100) if (i!=id) $('optionsline'+i).style.display='none';
		if (id!=100) if (i!=id) $('headline'+i).style.display='none';
		i++;	
	}
	$('optionsline'+id).style.display='inline'
}

var openpromo=false;
function enterPromo (media)
{
	clearItem('promo');
	if (!openpromo)
	{
		var ajax = new ajaxObject('/ajaxDrop/',evalAjax);
		ajax.update('Media='+media,'POST');
	}
	//openpromo=true;
}
function promofocus ()
{
 if ($('promoCodeSect').style.display!="none")
 {
	$('PromotionCode').focus();
	$('PromotionCode').select();
 }
}
function ajaxCmd (page,dat)
{
	var ajax = new ajaxObject(page,evalAjax);
	ajax.update(dat,'POST');
}

function menuInit ()
{
	var i=1;
	while ($('menu_'+i))
	{
		$('menu_'+i).onmouseover=function(){ displayMenu(this);}
		$('menu_'+i).onmouseout=function(){ hideMenu(this);}
		i++;
	}
	i=1;
	while ($('menu_'+i+'_content'))
	{
		$('menu_'+i+'_content').onmouseover=function(){ clearMenuTimer(); }
		$('menu_'+i+'_content').onmouseout=function(){ menuTimer=window.setTimeout("closeMenus()",300);  }
		i++;
	}
}
function displayMenu (obj)
{	
	clearTimeout(menuTimer);
	var i=1;
	
	while ($('menu_'+i+'_content'))
	{
		
		$('menu_'+i).style.background='';
		$('menu_'+i+'_content').style.display='none';
		i++;
	}
	var id=obj.id.split('_')[1];

	$('menu_'+id+'_content').style.display='block';

	$('menu_'+id+'_content').style.top='122px';
	var popupWidth=$('menu_'+id+'_content').offsetWidth;
	var tabWidth=$('menu_'+id).offsetWidth;




	if ((findPos(obj)[0]+popupWidth)>1000)
	{
	 	var newLeft=(findPos(obj)[0]-findPos($('wrapper'))[0])-popupWidth+tabWidth;
		if (newLeft>0)
		{
			$('menu_'+id+'_content').style.left=newLeft+'px';
		} else {
			var bWidth=(findPos($('wrapper'))[0]*2)+1000;
			
			$('menu_'+id+'_content').style.left=((bWidth/2)-(popupWidth/2)-findPos($('wrapper'))[0])+'px';
		}
	} else {
		$('menu_'+id+'_content').style.left=(findPos(obj)[0]-findPos($('wrapper'))[0])+'px';
	}

	$('menu_'+id).style.background='#BBBBBB';
	hideSelects('hidden');

}


function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
		}
	}
	return [curleft,curtop];
}
var menuTimer;
function hideMenu (id)
{
	menuTimer=window.setTimeout("closeMenus()",300);
}
function closeMenus ()
{
	var i=1;
	while ($('menu_'+i+'_content'))
	{
		$('menu_'+i).style.background='';
		$('menu_'+i+'_content').style.display='none';
		i++;
	}
	hideSelects('visible');

}
function clearMenuTimer ()
{
	clearTimeout(menuTimer);
}
function hideSelects(action) {
if (action!='visible'){action='hidden';}
if (navigator.appName.indexOf("MSIE")) {
for (var S = 0; S < document.forms.length; S++){
for (var R = 0; R < document.forms[S].length; R++) {
if (document.forms[S].elements[R].options) {
document.forms[S].elements[R].style.visibility = action;
}
}
}
}
}