eInfo			= '<a href="mailto:info@austwinetourco.com.au">info@austwinetourco.com.au</a>';
eContactHome	= '<a href="mailto:info@austwinetourco.com.au">CONTACT US</a>';
eContact		= '<a href="mailto:info@austwinetourco.com.au">Contact Us</a>';



//##################################*
// preload image arrays for rollovers
//##################################
if (document.images)
	{
	sourceImgOFF=new Array('i/b-hoff.gif','i/b-bgcoff.gif','i/b-foff.gif','i/b-apoff.gif','i/b-eoff.gif')
	sourceImgON =new Array('i/b-hon.gif','i/b-bgcoff.gif','i/b-fon.gif','i/b-apon.gif','i/b-eoff.gif')
    
	bON = new Array(); bOFF = new Array(); roON = new Array(); roOFF = new Array();

	for (var i=0; i < sourceImgON.length; i++)
        {
        bON[i] = new Image();
        bON[i].src = sourceImgON[i];
        bOFF[i] = new Image();
        bOFF[i].src = sourceImgOFF[i];
          
        roON[i] = new Image();
        roOFF[i] = new Image();
        }
	}





// FUNC ------------------------------------------------------------------------------------ extractFileName
function extractFileName(fullPath)
{
	var lastSlash 			// the position of the last slash in the path
	var fileName  			// the name of the file
	lastSlash	= fullPath.lastIndexOf("/")
	fileName 	= fullPath.substring(lastSlash+1,fullPath.length)
	return fileName
} 

//FUNC  ------------------------------------------------------------------------------------ loadGraphic
function loadGraphic()
{
	if (document.images)
   		{
    		resetbuttons();
    
		try {framURL=document.location.href;} catch (e) {framURL="index.html";}    	

		framSrc=extractFileName(framURL);

    		if (framSrc.indexOf("index")!=-1)		{roMouseOver(0);roOFF[0].src=roON[0].src;return;}
  		if (framSrc.indexOf("daily")!=-1) 		{roMouseOver(1);roOFF[1].src=roON[1].src;setTourSubmenu(1);return;}
  		if (framSrc.indexOf("deluxe")!=-1) 		{roMouseOver(1);roOFF[1].src=roON[1].src;setTourSubmenu(2);return;}
  		if (framSrc.indexOf("premium")!=-1) 	{roMouseOver(1);roOFF[1].src=roON[1].src;setTourSubmenu(3);return;}
  		if (framSrc.indexOf("private")!=-1) 	{roMouseOver(1);roOFF[1].src=roON[1].src;setTourSubmenu(4);return;}
  		if (framSrc.indexOf("balloon")!=-1) 	{roMouseOver(1);roOFF[1].src=roON[1].src;setTourSubmenu(5);return;}

   		if (framSrc.indexOf("yarra_valley")!=-1) 	{roMouseOver(2);roOFF[2].src=roON[2].src;return;}
    		if (framSrc.indexOf("gift")!=-1) 		{roMouseOver(3);roOFF[3].src=roON[3].src;return;}

    		if (framSrc.indexOf("about")!=-1)		{roMouseOver(4);roOFF[4].src=roON[4].src;setMoreSubmenu(0);return;}
    		if (framSrc.indexOf("gallery")!=-1)		{roMouseOver(4);roOFF[4].src=roON[4].src;setMoreSubmenu(1);return;}
    		if (framSrc.indexOf("video")!=-1)		{roMouseOver(4);roOFF[4].src=roON[4].src;setMoreSubmenu(2);return;}
    		if (framSrc.indexOf("faq")!=-1)		{roMouseOver(4);roOFF[4].src=roON[4].src;setMoreSubmenu(3);return;}
    		if (framSrc.indexOf("testi")!=-1)		{roMouseOver(4);roOFF[4].src=roON[4].src;setMoreSubmenu(4);return;}
    		if (framSrc.indexOf("links")!=-1)		{roMouseOver(4);roOFF[4].src=roON[4].src;setMoreSubmenu(5);return;}
    		if (framSrc.indexOf("privacy")!=-1)		{roMouseOver(4);roOFF[4].src=roON[4].src;setMoreSubmenu(6);return;}
    		if (framSrc.indexOf("terms")!=-1)		{roMouseOver(4);roOFF[4].src=roON[4].src;setMoreSubmenu(7);return;}
    		if (framSrc.indexOf("contact")!=-1)		{roMouseOver(4);roOFF[4].src=roON[4].src;setMoreSubmenu(8);return;}

		//default action
		document.location.href = "index.html"; 
		roOnClick(0);
		roMouseOver(0);
		roOFF[0].src=roON[0].src;    
    }
  }


//FUNC  ------------------------------------------------------------------------------------ setMoreSubMenu
function setMoreSubmenu(id) 
{
	thisId 	= 'submenu' + id;  
	thisImg	= 'i/more_menu' + id + '_on.gif';
	document.getElementById(thisId).src = thisImg;
	document.getElementById(thisId).onmouseover	= function(){};
	document.getElementById(thisId).onmouseout	= function(){};
}

//FUNC  ------------------------------------------------------------------------------------ setMoreSubMenu
function setTourSubmenu(id) 
{
	thisId 	= 'submenu' + id;  
	thisImg	= 'i/tour_menu' + id + '_on.gif';
	document.getElementById(thisId).src = thisImg;
	document.getElementById(thisId).onmouseover	= function(){};
	document.getElementById(thisId).onmouseout	= function(){};
}
  

//FUNC  ------------------------------------------------------------------------------------ resetbuttons
function resetbuttons()
  {

  }
  
//FUNC  ------------------------------------------------------------------------------------ roMouseOver
function roMouseOver(roID)
  {

  }

//FUNC  ------------------------------------------------------------------------------------ roMouseOver
function roMouseOut(roID)
  {

  }
  
//FUNC  ------------------------------------------------------------------------------------ roMouseOver
function roOnClick(roID)
  {

  }


//FUNC  ------------------------------------------------------------------------------------ setShadows
function setShadows() 
{
bottomGap = 24;

viewportHeight = getViewportHeight();

dom = findDOM('mainbody');
tempMbTop 		= dom.offsetTop; 				

dom = findDOM('innerbody');
innerbodyHeight	= dom.offsetHeight;
tempIbTop 		= dom.offsetTop; 				
tempIbHeight 	= innerbodyHeight + bottomGap ; 	
										
if ((viewportHeight - bottomGap) < (tempIbTop + tempIbHeight))
	{	
	newHeight = tempIbTop + tempIbHeight;
	//alert("page bigger than screen so scroll");alert(viewportHeight);alert(tempIbTop + tempIbHeight);
	}
else
	{
	newHeight = viewportHeight - tempMbTop - 2;
	//alert("page smaller than screen so pad bottom with colour");alert(viewportHeight);alert(tempIbTop + tempIbHeight);
	}

dom = findDOM('mainbody',1);
dom.height = newHeight + 'px';

dom = findDOM('rightshadow',1);
dom.height	= (innerbodyHeight - 1) + 'px';
dom.width	= '11px';
dom.visibility = 'visible';

dom = findDOM('leftshadow',1);
dom.height	= (innerbodyHeight - 1) + 'px';
dom.width	= '8px';
dom.visibility = 'visible';
}
  
  
//FUNC  ------------------------------------------------------------------------------------ writeMenu
function writeMenu(roID)
{  
  

}


  
//FUNC  ------------------------------------------------------------------------------------ getViewportHeight
function getViewportHeight()
{  
var viewportwidth;
var viewportheight;
 
// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
 
if (typeof window.innerWidth != 'undefined')
 {
      viewportwidth = window.innerWidth,
      viewportheight = window.innerHeight
 }
 
// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

 else if (typeof document.documentElement != 'undefined'
     && typeof document.documentElement.clientWidth !=
     'undefined' && document.documentElement.clientWidth != 0)
 {
       viewportwidth = document.documentElement.clientWidth,
       viewportheight = document.documentElement.clientHeight
 }
 
 // older versions of IE
 
 else
 {
       viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
       viewportheight = document.getElementsByTagName('body')[0].clientHeight
 }
return viewportheight;
}
