/**********************************************************************************   
ChangeText 
*   Copyright (C) 2001 <a href="/dhtmlcentral/thomas_brattli.asp">Thomas Brattli</a>
*   This script was released at DHTMLCentral.com
*   Visit for more great scripts!
*   This may be used and changed freely as long as this msg is intact!
*   We will also appreciate any links you could give us.
*
*   Made by <a href="/dhtmlcentral/thomas_brattli.asp">Thomas Brattli</a> 
*********************************************************************************/

function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom && !this.opera5)?1:0;
	this.ie8=(this.ver.indexOf("MSIE 8")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie8 || this.ie7 || this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=new lib_bwcheck()


if(document.layers){ //NS4 resize fix...
	scrX= innerWidth; scrY= innerHeight;
	onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)} }
}

/****
Variables to set 
****/
msgFont= "verdana, arial"	// The font for the message
msgFontSize=10				// Set the fontSize in px
msgFontColor="#EEEEEE"		// Set the fontColor
msgWidth= "500"				// Set the width of the messageblock here for netscape 4

//Set the text you want to display on mouseover here.
messages=new Array()
messages[0]="<br><center><img src=\"Images\\banner.jpg\" width=\"500\" height=\"70\" alt=\"\" border=\"0\"></center>"//This is the default text that appears when you mouse out.
messages[1]="<br><center><table bgcolor=#01629C><tr><td><img src=\"Images\\number5.jpg\" width=\"66\" height=\"64\" alt=\"\" border=\"0\"></td><td width=\"427\"><font color=#FFCC99><font face=Times New Roman><i><b>History</b></i></font></font><br><font face=Verdana><font size=-1>A brief look at the history of our vinyard and our cool climate wines...</font></font></td></tr></table></center>"
messages[2]="<br><center><table bgcolor=#01629C><tr><td><img src=\"Images\\grapes2.jpg\" width=\"66\" height=\"64\" alt=\"\" border=\"0\"></td><td width=\"427\"><font color=#FFCC99><font face=Times New Roman><i><b>News & Events</b></i></font></font><br><font face=Verdana><font size=-1>Find out about current news and up coming events at cellar door...</font></font></td></tr></table></center>"
messages[3]="<br><center><table bgcolor=#01629C><tr><td><img src=\"Images\\number70.jpg\" width=\"66\" height=\"64\" alt=\"\" border=\"0\"></td><td width=\"427\"><font color=#FFCC99><font face=Times New Roman><i><b>Our Wines</b></i></font></font><br><font face=Verdana><font size=-1>Want to know what wines we produce? Take a look at our current wine list...</font></font></td></tr></table></center>"
messages[4]="<br><center><table bgcolor=#01629C><tr><td><img src=\"Images\\number40.jpg\" width=\"66\" height=\"64\" alt=\"\" border=\"0\"></td><td width=\"427\"><font color=#FFCC99><font face=Times New Roman><i><b>Awards</b></i></font></font><br><font face=Verdana><font size=-1>We take pride in the quality of our wines. See our list of awards, trophies and medals...</font></font></td></tr></table></center>"
messages[5]="<br><center><table bgcolor=#01629C><tr><td><img src=\"Images\\2glass.jpg\" width=\"66\" height=\"64\" alt=\"\" border=\"0\"></td><td width=\"427\"><font color=#FFCC99><font face=Times New Roman><i><b>Orders</b></i></font></font><br><font face=Verdana><font size=-1>To order from our current wine list, simply print an order form and send it to us!</font></font></td></tr></table></center>"
messages[6]="<br><center><table bgcolor=#01629C><tr><td><img src=\"Images\\fullmap.gif\" width=\"66\" height=\"64\" alt=\"\" border=\"0\"></td><td width=\"427\"><font color=#FFCC99><font face=Times New Roman><i><b>Map</b></i></font></font><br><font face=Verdana><font size=-1>A map of the Canberra region showing the location of Pankhurst Wines and neighbouring wineries...</font></font></td></tr></table></center>"
messages[7]="<br><center><table bgcolor=#01629C><tr><td><img src=\"Images\\number30.jpg\" width=\"66\" height=\"64\" alt=\"\" border=\"0\"></td><td width=\"427\"><font color=#FFCC99><font face=Times New Roman><i><b>Contact Us</b></i></font></font><br><font face=Verdana><font size=-1>Come and visit Pankhust Wines! please contact us for appointments, comments and queries...</font></font></td></tr></table></center>"

/********************************************************************************
You don't have to change anything below this
********************************************************************************/

//ChangeText object constructor.
function makeChangeTextObj(obj){
   	this.css = bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0;	
   	this.writeref = bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj].document:0;	
	this.writeIt = b_writeIt;					
}
function b_writeIt(text,num){
	if (bw.ns4){
		this.writeref.write(text)
		this.writeref.close()
	}
    else this.writeref.innerHTML = messages[num]
}

//The mouoseover function. Calls the writeIt method to write the text to the div.
function changeText(num){
	if(bw.bw) oMessage.writeIt('<table width="'+msgWidth+'" height="70" bgcolor="#01629C" border="0" cellpadding="0" cellspacing="0"><tr><td><span style="font-size:'+msgFontSize+'px; font-family:'+msgFont+'; color:'+msgFontColor+'">'+messages[num]+'</span></td></tr></table>', num)
}

//The init function. Calls the object constructor and initiates some properties.
function changeTextInit(){
	//Fixing the browsercheck for opera... this can be removed if the browsercheck has been updated!!
	bw.opera5 = (navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?true:false
	if (bw.opera5) bw.ns6 = 0
	
	oMessage = new makeChangeTextObj('divMessage')
	oLinks = new makeChangeTextObj('divLinks')
	//Setting the style properties of the text layer.
	if(bw.dom || bw.ie4){
		with(oMessage.writeref.style){fontFamily=msgFont; fontSize=msgFontSize+"px"; color=msgFontColor}
	}
	//Both layers are hidden by default to prevent users from mousing over them and creating errors while the page loads.
	oMessage.css.visibility= "visible"
	oLinks.css.visibility= "visible"
}

//If the browser is ok, the init function is called on pageload. 
if (bw.bw) onload = changeTextInit
