//<![CDATA[

// - Reeds Dairy 
// This code is copyright 2007 - Christina Hills 
// This code may NOT be used without permission.

function findObj(theObj, theDoc){
var p, i, foundObj;
if(!theDoc) theDoc = document;
if((p = theObj.indexOf("?")) > 0 && parent.frames.length)
   {theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);}
if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
for (i=0; !foundObj && i < theDoc.forms.length; i++)
foundObj = theDoc.forms[i][theObj];
for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++)
foundObj = findObj(theObj,theDoc.layers[i].document);
if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
return foundObj;
}

function hideLayer(layername){
layer=findObj(layername);
if(layer.style){layer=layer.style;}
layer.visibility='hidden'; 
}


// -------------------------------------------------------------------
// -           External Functions Code
// --------------------------------------------------------------------
	
			
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


// -------------------------------------------------------------------
// -           Xtina External Functions Code
// --------------------------------------------------------------------




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



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

function PrintPage(){
   if (window.print) 
    {
       window.print();
    }
    else
    {
       alert("I'm sorry, Your Web Browser does not support this print method. To print, close this window and select File>Print from your drop down menus.");
    }
}

function PrintThisPage(){

  document.writeln(' <font size="5" face="wingdings">&#050;</font><b> <a href="javascript:PrintPage()">Print Page</b></a><br> ');
  }
  
function EmailThisPage() {

 document.writeln(' <font size="4" face="wingdings">&#042;</font>&nbsp; <b>');
 document.writeln( '<A HREF=\'mailto:?Subject=Your Friend Recommended this Page from ShoppingCartQueen.com&body=I highly recommend you read this: ' +document.URL+ '. This page comes from http://www.ShoppingCartQueen.com, the best place for shopping cart and autoresponder tips and information.\'>E-mail  to a Friend</A></b><br>');
}
 // ----------------------------------------------------------------------------------




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

function todaysDate() {

/*Current date script credit: 
JavaScript Kit (www.javascriptkit.com)
Over 200+ free scripts here!

Modified by Christina Hills
*/
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December");

var mydate=new Date();
var year=mydate.getYear();

var day=mydate.getDay();
var month=mydate.getMonth();
var daym=mydate.getDate();

var thedaytodayis = "";

	if (year < 1000)
	   year+=1900;
	   
	if (daym<10)
	   daym="0"+daym;

    thedaytodayis = " " + dayarray[day] + ", " + montharray[month] + " " + daym + ", " + year; 
	
	
	return (thedaytodayis);

}



function findZipCode(passFormName) {

/* inside our area – 253187
outside our area – 253194
*/

// this will put in the hidden fields to the 1shoppingcart form

  var insideArea = "253187";
  var outsideArea = "253194";
  
  switch ( passFormName.Zip.value )
  {
    // all zip codes for the area
    case "83402" :
    case "83401" :
    case "83404" :
    case "83406" :
    case "83274" :
    case "83442" :
    case "83440" :
    case "83224" :
    case "83221" :   passFormName.defaultar.value = insideArea;
	break;
	default: passFormName.defaultar.value = outsideArea;
	break;
	}
 
 //alert(' ar is set to ', passFormName.defaultar.value);
  //alert(' zip is ', passFormName.Zip.value);
	return true;
}



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

function array () {}




//]]>
