//<!-- Hide JavaScript from Java-Impaired Browsers

//////////////////////////////////////
// PRELOADER AND ROLLOVER  FUNCTION //
//////////////////////////////////////

function preloadImages()
{
	if (document.images)
	{
		var imgs = new Array('side_biscuits_pastries.gif',
							 'side_childrensnovelty_cakes.gif',
							 'side_contact_us.gif',
							 'side_event_catering.gif',
							 'side_handmade_chocolates.gif',
							 'side_hospitality_wholesale.gif',
							 'side_individual_serves.gif',
							 'side_ourhistory.gif',
							 'side_specialty_cakes.gif',
							 'side_wedding_cakes.gif',
							 'side_christmas_specials.gif',
							 'side_welcome.gif');
	
		imgSrc=new Array();
		for (i=0; i<imgs.length; i++)
		{
  			imgSrc[i] = new Image();
	  		imgSrc[i].src= imgs[i];
		}
	}
}

function changeImages()
{
    if (document.images)
    {
		for (var i=0; i<changeImages.arguments.length; i+=2)
      	{
        	document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
      	}
    }
}

function rollOver(imName,Over)
{
	if (!document.images)
    {
    	return;
    }

    whichIm = document.images[imName];
    if (Over)
    {
		whichIm.src = "images/" + imName + "_over.gif";
    }
    else
    {
		whichIm.src = "images/" + imName + ".gif";
    }
}
// END PRELOADER AND ROLLOVER FUNCTION //

/////////////////////////
// NEW WINDOW FUNCTION //
/////////////////////////

function openPopup(whichImg, h, w)
{
	newHeight = eval(h) + 30;
	newWidth = eval(w) + 20;
	var params = "height="+newHeight+",width="+newWidth+",resizable=no,location=no,menu=no";
	
	window.open(whichImg,"newWin",params);
	
	
	//openWin.focus();
}

////////////////////////
// SHOW DATE FUNCTION //
////////////////////////
  var theDate = new Date();
  var theMonth = theDate.getMonth() + 1;
  var theDay = theDate.getDate();
  var theYear = theDate.getYear();
  if (theDay < 10)
	theDay = "0" + theDay;
  if (theMonth < 10)
	theMonth = "0" + theMonth;
  if (theYear < 1000)
	theYear += 1900;
  var showDate = theDay + "/" + theMonth + "/" + theYear;
// END SHOW DATE FUNCTION //


////////////////////////
// JUMP MENU FUNCTION //
////////////////////////
function jumpTo(newLoc)
{
	newPage = newLoc.options[newLoc.selectedIndex].value
	
	if (newPage != "")
	{
		window.location.href = newPage
	}
}
// END JUMP MENU FUNCTION //



///////////////////////////
// QUERY STRING FUNCTION //
///////////////////////////
function QueryString(key)
{
	var value = null;
	for (var i=0;i<QueryString.keys.length;i++)
	{
		if (QueryString.keys[i]==key)
		{
			value = QueryString.values[i];
			break;
		}
	}
	return value;
}
QueryString.keys = new Array();
QueryString.values = new Array();

function QueryString_Parse()
{
	var query = window.location.search.substring(1);
	var pairs = query.split("&");
	
	for (var i=0;i<pairs.length;i++)
	{
		var pos = pairs[i].indexOf('=');
		if (pos >= 0)
		{
			var argname = pairs[i].substring(0,pos);
			var value = pairs[i].substring(pos+1);
			
			QueryString.keys[QueryString.keys.length] = argname;
			QueryString.values[QueryString.values.length] = value;		
		}
	}

}

QueryString_Parse();
// END QUERY STRING FUNCTION //


//-->