// JavaScript DocumentrequiredMajorVersion = 7;// Minor version of Flash requiredrequiredMinorVersion = 0;// Revision of Flash requiredrequiredRevision = 0;// the version of javascript supportedjsVersion = 1.0;function flip(src){	if (src.src.match(/_f2/i))	{		src.src = src.src.replace(/_f2/,"");	}	else	{		src.src = src.src.replace(/.gif/,"_f2"+(src.src.match(".gif")?".gif":".jpg"));	}}function focusTo(sTarget){	if (document.getElementById)		document.getElementById(sTarget).focus();	else if (document.all)		document.all(sTarget).focus();}function validateSearch(){	if (document.getElementById)		{		if (document.getElementById("searchString").value=="")		{			alert("Please enter a Product Name, Colour or Code.");			document.getElementById("searchString").focus();			return false;		}		else			return true;	}	else if (document.all)	{		if (document.all("searchString").value=="")		{			alert("Please enter a Product Name, Colour or Code.");			document.all("searchString").focus();			return false;		}		else			return true;	}}/*Name: validateStockistSearchDesc: Checks if passed control contains an empty string or value other than passed defult valuevalidateStockistSearch(control, defaultValue)Param: control [control to work with in form]param: defaultValue [default value of control if required]*/function validateStockistSearch(control, defaultValue){	//alert("Validate stockist: control: " + control + " Default value: " + defaultValue);	if (document.getElementById(control).value=="" || document.getElementById(control).value == defaultValue)	{		alert("Please enter a postcode or suburb.");		document.getElementById(control).focus();		return false;	}	else	{		return true;	}}function validateStockistAdd(){	var Message = "";		if (document.getElementById("accNo").value == "")	{		Message += "* Account Number Missing\n";	}		if (document.getElementById("accName").value == "")	{		Message += "* Account Name Missing\n";	}		if (document.getElementById("address").value == "" && document.getElementById("address2").value == "" )	{		Message += "* Address Missing\n";	}		if (document.getElementById("city").value == "")	{		Message += "* City Missing\n";	}		if (document.getElementById("state").value == "")	{		Message += "* State Missing\n";	}		if (document.getElementById("postcode").value == "")	{		Message += "* Postcode Missing\n";	}	else if (!/\d{4}/.test(document.getElementById("postcode").value))	{		Message += "* Postcode Invalid\n";	}			if (Message != "" )	{		alert("The following fields are missing and require your attention:\n"+Message);		return false;	}	else	{		return true;	}}/*function checkLoginForm(){	var s ="";	if (!(document.getElementById('AccountNo1').value.match(/^(\d){6}$/)) )	{		document.getElementById('AccountNo1').className='highlight';		document.getElementById('AccountNo1').focus();		s+="* Account Number is invalid\n";	}	else	{		document.getElementById('AccountNo1').className='';	}		if (!(document.getElementById('AccountNo2').value.match(/^(\d){4}$/))&& document.getElementById('AccountNo1').value != "200015")	{		document.getElementById('AccountNo2').className='highlight';		if (s=="")		{			document.getElementById('AccountNo2').focus();			s +="* Account Number is invalid\n";		}	}	else	{		document.getElementById('AccountNo2').className='';	}	if (!(document.getElementById('Email').value.match(/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$/)))	{		document.getElementById('Email').className='highlight';		if (s=="")		{			document.getElementById('Email').focus();		}		s +="* Email address is invalid\n";	}	else	{		document.getElementById('Email').className='';	}	if (s!="")	{		alert("The following fields are invalid and require your attention:\n"+s);		return false;	}	else	 return true;}*/function checkLoginForm(){	var s ="";/*	if (!(document.getElementById('username').value.match(/^(\d){6}$/)) )	{		document.getElementById('username').className='highlight';		document.getElementById('username').focus();		s+="* Username is invalid\n";	}	else*/	{		document.getElementById('usernameLogin').className='';	}	/*	if (!(document.getElementById('Email').value.match(/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$/)))	{		document.getElementById('Email').className='highlight';		if (s=="")		{			document.getElementById('Email').focus();		}		s +="* Email address is invalid\n";	}	else*/	{		document.getElementById('password').className='';	}	if (s!="")	{		alert("The following fields are invalid and require your attention:\n"+s);		return false;	}	else	 return true;}function resize() {	/*if (document.getElementById("fullProductDetails"))	{		var fullProductDetails = document.getElementById("fullProductDetails");		var fullProduct = document.getElementById("fullProduct");		var maxheight=fullProductDetails.offsetHeight;		if (fullProduct.offsetHeight>maxheight)			maxheight=fullProduct.offsetHeight;		fullProductDetails.style.height=maxheight+"px";		fullProduct.style.height=maxheight+"px";		alert(fullProductDetails.style.height);		alert(fullProduct.style.height);	}*/}function confirmStockistLog() {	if (confirm('You must be logged in to access this feature.\n Do you wish to login now?'))	{		window.location='stockists_home.asp?login=yes&redirect='+escape(window.location+'&HiRes=add');	}}function confirmStockistLogWithoutRedirect() {	alert('You must be logged in to access this feature.\n Please log in using your User ID and Password.');}var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;jsVersion = 1.1;// JavaScript helper required to detect Flash Player PlugIn version informationfunction JSGetSwfVer(i){	// NS/Opera version >= 3 check for Flash plugin in plugin array	if (navigator.plugins != null && navigator.plugins.length > 0) {		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";      		var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;			descArray = flashDescription.split(" ");			tempArrayMajor = descArray[2].split(".");			versionMajor = tempArrayMajor[0];			versionMinor = tempArrayMajor[1];			if ( descArray[3] != "" ) {				tempArrayMinor = descArray[3].split("r");			} else {				tempArrayMinor = descArray[4].split("r");			}      		versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;            flashVer = versionMajor + "." + versionMinor + "." + versionRevision;      	} else {			flashVer = -1;		}	}	// MSN/WebTV 2.6 supports Flash 4	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;	// WebTV 2.5 supports Flash 3	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;	// older WebTV supports Flash 2	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;	// Can't detect in all other cases	else {				flashVer = -1;	}	return flashVer;} // If called with no parameters this function returns a floating point value // which should be the version of the Flash Player or 0.0 // ex: Flash Player 7r14 returns 7.14// If called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is availablefunction DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) { 	reqVer = parseFloat(reqMajorVer + "." + reqRevision);   	// loop backwards through the versions until we find the newest version		for (i=25;i>0;i--) {			if (isIE && isWin && !isOpera) {			versionStr = VBGetSwfVer(i);		} else {			versionStr = JSGetSwfVer(i);				}		if (versionStr == -1 ) { 			return false;		} else if (versionStr != 0) {			if(isIE && isWin && !isOpera) {				tempArray         = versionStr.split(" ");				tempString        = tempArray[1];				versionArray      = tempString .split(",");							} else {				versionArray      = versionStr.split(".");			}			versionMajor      = versionArray[0];			versionMinor      = versionArray[1];			versionRevision   = versionArray[2];						versionString     = versionMajor + "." + versionRevision;   // 7.0r24 == 7.24			versionNum        = parseFloat(versionString);        	// is the major.revision >= requested major.revision AND the minor version >= requested minor			if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {				return true;			} else {				return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );				}		}	}		return (reqVer ? false : 0.0);}function MM_goToURL() { //v3.0  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");}function MM_openBrWindow(theURL,winName,features) { //v2.0  window.open(theURL,winName,features);}/*function MM_jumpMenu(targ,selObj,restore){ //v3.0  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");  if (restore) selObj.selectedIndex=0;}function MM_goToURL() { //v3.0  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");}*/function ldMenu(mySubject) {Indx=mySubject;if (document.getElementById && document.getElementById('searchString2'))	document.getElementById('searchString2').value='Suburb or postcode';var form;if (document.stocksearch)	form = document.stocksearch;else if (document.prodForm)	form = document.prodForm;else	return;with (form.region) {/*document.stocksearch.region.*/options.length=0;if (Indx==0){options[0]=new Option("(no region)","");if (document.getElementById && document.getElementById("map"))	document.getElementById("map").src="images/nothings_tougher_shirt_300x300.jpg";}if (Indx==1){options[0]=new Option("Melbourne (city)","metc");options[1]=new Option("Melbourne (east)","mete");options[2]=new Option("Melbourne (north)","metn");options[3]=new Option("Melbourne (west)","metw");options[4]=new Option("Melbourne (south east)","metse");options[5]=new Option("Melbourne (south west)","metsw");options[6]=new Option("State north","n");options[7]=new Option("State east","e");options[8]=new Option("State west","w");options[9]=new Option("State south west","sw");options[10]=new Option("State south east","se");options[11]=new Option("State north east","ne");if (document.getElementById && document.getElementById("map"))	document.getElementById("map").src="images/stockists/map_vic.gif";}if (Indx==2)   {  options[0]=new Option("Sydney (city)","metc");options[1]=new Option("Sydney (south)","mets");options[2]=new Option("Sydney (north)","metn");options[3]=new Option("Sydney (west)","metw");options[4]=new Option("Sydney (north west)","metnw");options[5]=new Option("Sydney (south west)","metsw");options[6]=new Option("State central","c");options[7]=new Option("State north","n");options[8]=new Option("State central coast","ce");options[9]=new Option("State north east coast","ne");options[10]=new Option("State south east coast","se");options[11]=new Option("State west","w");options[12]=new Option("State central","c");options[11]=new Option("State south","s");if (document.getElementById && document.getElementById("map"))	document.getElementById("map").src="images/stockists/map_nsw.gif";}if (Indx==3){options[0]=new Option("ACT (all)","act");if (document.getElementById && document.getElementById("map"))	document.getElementById("map").src="images/stockists/map_oz.gif";}if (Indx==4)   {  options[0]=new Option("Brisbane (city)","metc");options[1]=new Option("Brisbane (south)","mets");options[2]=new Option("Brisbane (north)","metn");options[3]=new Option("Brisbane (west)","metw");options[4]=new Option("Brisbane (east)","e");options[5]=new Option("Brisbane (south west)","metsw");options[6]=new Option("Brisbane (south east)","metse");options[7]=new Option("State north","n");options[8]=new Option("State east","e");options[9]=new Option("State south east inland","sei");options[10]=new Option("State south east coast","sec");options[11]=new Option("State central","c");options[12]=new Option("State south","s");if (document.getElementById && document.getElementById("map"))	document.getElementById("map").src="images/stockists/map_qld.gif";}if (Indx==5)   {  options[0]=new Option("Adelaide (city)","metc");options[1]=new Option("Adelaide (south)","mets");options[2]=new Option("Adelaide (north)","metn");options[3]=new Option("Adelaide (east)","mete");options[4]=new Option("Adelaide (west)","metw");options[5]=new Option("State north","n");options[6]=new Option("State east","e");options[7]=new Option("State central","c");options[8]=new Option("State south","s");options[9]=new Option("State south east","se");if (document.getElementById && document.getElementById("map"))	document.getElementById("map").src="images/stockists/map_sa.gif";}if (Indx==6)   {  options[0]=new Option("Perth (city)","metc");options[1]=new Option("Perth (south)","mets");options[2]=new Option("Perth (north)","metn");options[3]=new Option("Perth (east)","mete");options[4]=new Option("Perth (south west)","metsw");options[5]=new Option("Perth (north east)","metne");options[6]=new Option("State north","n");options[7]=new Option("State north west","nw");options[8]=new Option("State south south-west","ssw");options[9]=new Option("State west south-west","wsw");options[10]=new Option("State central","c");options[11]=new Option("State south","s");options[12]=new Option("State west","w");if (document.getElementById && document.getElementById("map"))	document.getElementById("map").src="images/stockists/map_wa.gif";}if (Indx==7)   {  options[0]=new Option("Hobart","met");options[1]=new Option("State central","c");options[2]=new Option("State north east","ne");options[3]=new Option("State north west","nw");if (document.getElementById && document.getElementById("map"))	document.getElementById("map").src="images/stockists/map_tas.gif";}if (Indx==8)   {  options[0]=new Option("Darwin","met");options[1]=new Option("State south (Alice Springs)","s");if (document.getElementById && document.getElementById("map"))	document.getElementById("map").src="images/stockists/map_nt.gif";}if (Indx==9)   {  options[0]=new Option("New Zealand (all)","nz");if (document.getElementById && document.getElementById("map"))	document.getElementById("map").src="images/stockists/map_oz2.gif";}if (Indx!=0){	OptNo=new Option("(no region)","");	try	{		add(OptNo,options[0]);	} catch (ex)	{		add(OptNo,0);	}	options[0].selected = true;}//addProduct.region.options[0].selected=true}}function mapLoad(src){	//alert('all goes well');	var loader=document.getElementById("maploader");	var frm=document.getElementById("mapframe");	if (frm.src.match(/street-directory.com.au/))	{		//alert('all still goes well');		loader.style.display='none';		frm.style.display='block';	}}function OnlineOrder(){		document.onlineorder.submit();	}