// Start Main Interface Scripts

	// for text link fades
	var aColor = new Array();
	
	var sIFR_on = false;
	if(typeof sIFR == "function"){sIFR_on = true}

	// Text Roll Overs
	aColor.push(new Array("footer_link", "#424141", "#7F7F7F"));

	// Side Menu Scripts
		
		// Text Roll Overs
		aColor.push(new Array("leftmenu_item", "#FFFFFF", "#F3CB11"));
		aColor.push(new Array("leftmenu_subitem", "#FFFFFF", "#BDBDBD"));	
		aColor.push(new Array("sitemap_but", "#FFFFFF", "#F3CB11"));	
		aColor.push(new Array("crumb_item", "#737373", "#323232"));	
		
		// Search
		var searchBlankText = "your search text here"
		function processSearch() {
			if (document.forms.searchform.q.value == '') {
				alert('Please enter a keyword');
				document.forms.searchform.q.focus();
				return false;
			}
		}
		
		var wrUserBlankText = "your customer id";
		var wrPasswordBlankText = "your customer id";
		
		function Graphic(GraphicURL) { NewWindow = window.open ( GraphicURL, "DisplayWindow", 
		"toolbar=no,location=no,directories=no,status=no, scrollbars=no,resizeable=no,copyhistory=no,width=580,height=439") 
		} 
		
	// initialize Text Fade Effects
		textfade_init();

// End Main Interface Scripts

var popUpWin=0;
function showWRMap() {
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  var width="461", height="505";
  var left = (screen.width/2) - width/2;
  var top = (screen.height/2) - height/2;
  popUpWin = open('http://www.webresource.com.au/?fuseaction=wrmap', 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

// Example:

// 

function simplePreload()
{ 
  var args = simplePreload.arguments;
  document.imageArray = new Array(args.length);
  for(var i=0; i<args.length; i++)
  {
    document.imageArray[i] = new Image;
    document.imageArray[i].src = args[i];
  }
}

function setMyWRPassCaption (visible) {
	var cap = document.getElementById('password_txt_caption');
	if (visible) {
		if (document.forms.mywr_login_form.password.value == "") {
			cap.style.display = "block";
		}
	} else {
		cap.style.display = "none";
	}
}


/***********************************************
* Gradual Highlight image script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var baseopacity=80

function slowhigh(which2){
imgobj=which2
browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : ""
instantset(baseopacity)
highlighting=setInterval("gradualfade(imgobj)",50)
}

function slowlow(which2){
cleartimer()
instantset(baseopacity)
}

function instantset(degree){
if (browserdetect=="mozilla")
imgobj.style.MozOpacity=degree/100
else if (browserdetect=="ie")
imgobj.filters.alpha.opacity=degree
}

function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}

function gradualfade(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.1, 0.99)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}

var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height, scrollbars) {
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }

	// center window
	w = screen.availWidth;
	h = screen.availHeight;

	var popW = width, popH = height;
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	// end center window
  
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+scrollbars+',resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+leftPos+', top='+topPos+',screenX='+leftPos+',screenY='+topPos+'');
}



