

var catid;
var sub_regions='';
var parentid;

jQuery.noConflict();

String.prototype.trim = function() 
{
	return this.replace(/^\s*|\s(?=\s)|\s*$/g,"");
}

function removeBorder(element,height,width)
{
	element.style.position = "absolute";
	element.style.clip ="rect("+1+"px "+width+"px "+height+"px "+1+"px)" ;
}

var style ="background-color:#F6F6F6;color:#616161;font-weight:normal";
var styleparent ="background-color:#F6F6F6;color:#616161;font-weight:bold";
function showLocation_1(str)
{
	if(str == "")
	{
		jQuery("#loadPostCodeCtr").hide();
		jQuery('#txtPostCode').hide();
		jQuery('#div_PostCode_Out').hide();
		jQuery("#quickSearchResult").hide();
		return;
	}
	jQuery("#loadPostCodeCtr").show();
   new Ajax.Request('AjaxServer.asp',
   {
    method:'get',
    parameters: {type: 'location', zip: str},
    onSuccess: function(data){
      var doc = data.responseXML.documentElement;
   if(doc.getElementsByTagName("parent").length >0)
   {
     jQuery("#quickSearchResult").html('');
     show_div('txtPostCode');

	  var ddl = "<select class='cb_corner' id='ddlLocation'  size='7' onload='removeBorder(this,this.clientHeight,this.clientWidth);' onchange='javascript:showRegion(this.options[this.selectedIndex].value,this.options[this.selectedIndex].text);'>"
	  for(var i=0; i < doc.getElementsByTagName("parent").length; i++)
	  {
	   
	   ddl += "<optgroup style='" + styleparent + "' label='" + doc.getElementsByTagName("parent")[i].getAttribute("name") + "'>";
	  
	   //show region
	   if(doc.getElementsByTagName("region").length >0)
	   {
	
	    for(var j=0;j<doc.getElementsByTagName("region").length;j++)
	    {
	        if(doc.getElementsByTagName("region")[j].getAttribute("id") == doc.getElementsByTagName("parent")[i].getAttribute("id"))
	        {
	            if(doc.getElementsByTagName("subregion").length > 0)
	              {
	               for(var k=0;k<doc.getElementsByTagName("subregion").length;k++)
	               {
	                if(doc.getElementsByTagName("subregion")[k].getAttribute("regionid") == doc.getElementsByTagName("region")[j].getAttribute("id"))
	                {
	                 ddl += "<option value='" + doc.getElementsByTagName("subregion")[k].getAttribute("id") + "' style='" + style + "'>" + "&nbsp;&nbsp;&nbsp;&nbsp;" + doc.getElementsByTagName("subregion")[k].getAttribute("name") + "</option>";
	                }
	               }//for subregion
	              }//if subregion
	        }
	     if(doc.getElementsByTagName("region")[j].getAttribute("parentid") == doc.getElementsByTagName("parent")[i].getAttribute("id"))
	     {
	      ddl += "<optgroup style='" + styleparent + "' label='" + "&nbsp;&nbsp;&nbsp;&nbsp;" + doc.getElementsByTagName("region")[j].getAttribute("name") + "'>";
	      
	      //show subregion
	      if(doc.getElementsByTagName("subregion").length > 0)
	      {
	       for(var k=0;k<doc.getElementsByTagName("subregion").length;k++)
	       {
	        if(doc.getElementsByTagName("subregion")[k].getAttribute("regionid") == doc.getElementsByTagName("region")[j].getAttribute("id"))
	        {
	         ddl += "<option value='" + doc.getElementsByTagName("subregion")[k].getAttribute("id") + "' style='" + style + "'>" + "&nbsp;&nbsp;&nbsp;&nbsp;" + doc.getElementsByTagName("subregion")[k].getAttribute("name") + "</option>";
	        }
	       }//for subregion
	      }//if subregion
		  ddl += "</optgroup>";
	     }//if check
	    }//for region
	   }//if region
		ddl += "</optgroup>";
	  }//for parent
	  ddl += "</select>";
		
		jQuery("#txtPostCode").html(ddl);
		if(!jQuery('#divCat').is(":visible"))
		{
			jQuery('#txtPostCode').show();
			jQuery('#div_PostCode_Out').show();
		
		}
		else
		{
			jQuery('#txtPostCode').hide();
			jQuery('#div_PostCode_Out').hide();
		}
		jQuery("#loadPostCodeCtr").hide();
		//jQuery('#divCat').hide();
		
   }
   else
   {
	  jQuery("#txtPostCode").hide();
	  jQuery("#div_PostCode_Out").hide();
	  jQuery("#quickSearchResult").html('There was no result found');
	  
	  if(jQuery('#divCat').is(":visible"))
	  {
	   jQuery('#divCat').hide();
	   jQuery('#txtCat').val('');
	  }
	  
	  if(jQuery('#cat').is(":visible"))
	  {
	   jQuery('#cat').hide();
	   jQuery('#cat_out').hide();
	  }
	  jQuery("#loadPostCodeCtr").hide();
   }
    },
    onFailure: function(){ 
	  jQuery("#quickSearchResult").html('There was no result found');
	 }
  });
}


function showRegion(str,text)
{
   sub_regions = str;
	jQuery('#txtPostCode').hide();
   jQuery('#div_PostCode_Out').hide();
   jQuery('#divCat').show();
   

	jQuery('#txt1').val( text.replace(/\u00a0/g,''));
}

function showCategory1(str)
{
  new Ajax.Request('AjaxServer.asp',
   {
    method:'get',
    parameters: {type: 'cat', catname: str},
    onSuccess: function(data){
        var doc = data.responseXML.documentElement;
        if(doc.getElementsByTagName("cat").length > 0)
		{
			jQuery("#quickSearchResult").html('');
			
			
			var ddl = "<select  class='cb_corner' id='ddlRegion' onclick='javascript:Search(this.value);' size='7' >"
			for(var i=0; i < doc.getElementsByTagName("cat").length; i++)
			{
				var style =""

				style ="background-color:#F6F6F6;color:#616161;font-weight:normal";
				
				ddl += "<option value='" + doc.getElementsByTagName("cat")[i].getAttribute("id") + "' style='" + style + "'>" + doc.getElementsByTagName("cat")[i].getAttribute("name") + "</option>";

			}//for
			ddl += "</select>";

			jQuery("#cat").html(ddl);
			jQuery("#cat").show();
			jQuery("#cat_out").show();
		}
		else
		{
			jQuery("#cat").hide();
			jQuery("#cat_out").hide();
			jQuery('#quickSearchResult').html('There was no result found');
		}
    },
    onFailure: function(){ jQuery('#quickSearchResult').html('There was no result found'); }
  });
}

function showCategory(str)
{
	if(str == "")
	{
		//jQuery("#loadPostCodeCtr").hide();
		//jQuery('#txtPostCode').hide();
		//jQuery('#div_PostCode_Out').hide();
		//jQuery("#quickSearchResult").hide();
		jQuery("#cat").hide();
	    jQuery("#cat_out").hide();
	    jQuery("#imgCatLoading").hide();
		return;
	}
	
	jQuery("#imgCatLoading").show();
    new Ajax.Request('AjaxServer.asp',
   {
       method: 'get',
       parameters: { type: 'cat', catname: str },
       onSuccess: function(data) {
           var doc = data.responseXML.documentElement;
           if (doc.getElementsByTagName("grandparent").length > 0) {
               jQuery("#quickSearchResult").html('');


               var ddl = "<select  class='cb_corner' id='ddlRegion' onchange='javascript:Search(this.value);' size='7' >"
               for (var i = 0; i < doc.getElementsByTagName("grandparent").length; i++) {
                   var style = ""

                   style = "background-color:#F6F6F6;color:#616161;font-weight:normal";
                   styleparent = "background-color:#F6F6F6;color:#616161;font-weight:bold";
                   ddl += "<optgroup style='" + styleparent + "' label='" + doc.getElementsByTagName("grandparent")[i].getAttribute("name") + "'>";
                   //show parent
                   if (doc.getElementsByTagName("parent").length > 0) {
                       for (var j = 0; j < doc.getElementsByTagName("parent").length; j++) {
                           if (doc.getElementsByTagName("parent")[j].getAttribute("parentid") == doc.getElementsByTagName("grandparent")[i].getAttribute("id")) {
                               if (doc.getElementsByTagName("cat").length > 0) {
                                   for (var k = 0; k < doc.getElementsByTagName("cat").length; k++) {
                                       if (doc.getElementsByTagName("cat")[k].getAttribute("parentid") == doc.getElementsByTagName("parent")[j].getAttribute("id")) {
                                           //ddl += "<option value='" + doc.getElementsByTagName("cat")[k].getAttribute("id") + "' style='" + style + "'>" + "&nbsp;&nbsp;" + doc.getElementsByTagName("cat")[k].getAttribute("name") + "</option>";
                                       } //if
                                   } //for
                               } //if

                           } //if 

                           if (doc.getElementsByTagName("parent")[j].getAttribute("parentid") == doc.getElementsByTagName("grandparent")[i].getAttribute("id")) {
						   		if(doc.getElementsByTagName("parent")[j].getAttribute("hasCat") == "True"){
								   if (doc.getElementsByTagName("cat").length > 0) {
										var sParentHasCat = new String();
										var index = 0;
										//ddl += "<option value='" + doc.getElementsByTagName("parent")[j].getAttribute("id") + "' style='" + styleparent + "'>" + "" + doc.getElementsByTagName("parent")[j].getAttribute("name") + "</option>";
										ddl += "<optgroup style='" + styleparent + "' label='" +  "&nbsp;&nbsp;&nbsp;&nbsp;" + doc.getElementsByTagName("parent")[j].getAttribute("name") + "'>";
										var temp = "";
									   for (var k = 0; k < doc.getElementsByTagName("cat").length; k++) {
										   if (doc.getElementsByTagName("cat")[k].getAttribute("parentid") == doc.getElementsByTagName("parent")[j].getAttribute("id")) {
											   ddl += "<option value='" + doc.getElementsByTagName("cat")[k].getAttribute("id") + "' style='" + style + "'>" + "&nbsp;&nbsp;&nbsp;&nbsp;" + doc.getElementsByTagName("cat")[k].getAttribute("name") + "</option>";
										   }
										  
									   }
									   ddl += "</optgroup>";
									}  
									else {
                                   ddl += "<option value='" + doc.getElementsByTagName("parent")[j].getAttribute("id") + "' style='" + style + "'>" + "&nbsp;&nbsp;" + doc.getElementsByTagName("parent")[j].getAttribute("name") + "</option>";
	                               }//else
								  }//if
								  else{
								  	ddl += "<option value='" + doc.getElementsByTagName("parent")[j].getAttribute("id") + "' style='" + styleparent + "'>" + "&nbsp;&nbsp;&nbsp;&nbsp;" + doc.getElementsByTagName("parent")[j].getAttribute("name") + "</option>";
								  }//if

                           } //if

                       } //for 
                   } //if 
                   ddl += "</optgroup>";
               } //for
               ddl += "</select>";

               jQuery("#cat").html(ddl);
               jQuery("#cat").show();
               jQuery("#cat_out").show();
			   jQuery("#imgCatLoading").hide();
           }
           else {
               jQuery("#cat").hide();
               jQuery("#cat_out").hide();
   			   jQuery("#imgCatLoading").hide();
               jQuery('#quickSearchResult').html('There was no result found');
           }
       },
       onFailure: function() { 
		   	jQuery('#quickSearchResult').html('There was no result found'); 
		   jQuery("#imgCatLoading").hide();		
		}
   });
}
function getParentCat(catid)
{
  var iParentID;
  new Ajax.Request('AjaxServer.asp',
   {
    method:'get',
    parameters: {type: 'parentcat', catid: catid},
    onSuccess: function(data){
        var doc = data.responseXML.documentElement;

        iParentID=  doc.getElementsByTagName("cat")[0].getAttribute("parentid");
    },
    onFailure: function(){ alert('Something went wrong...') }
  });
  return iParentID;
}
function Search(cat)
{
  catid = cat;

  new Ajax.Request('AjaxServer.asp',
   {
    method:'get',
    parameters: {type: 'parentcat', catid: catid},
    onSuccess: function(data){
        var doc = data.responseXML.documentElement;

        parentid=  doc.getElementsByTagName("cat")[0].getAttribute("parentid");
		recnum = doc.getElementsByTagName("cat")[0].getAttribute("recnum");
		//alert(recnum);
		if (parentid.length >0 && catid.length > 0 && sub_regions.length > 0){
			//alert("BizIndex.asp?Cat_ID=" + catid + "&pos=" + recnum + "&ParentID=" + parentid  + "&sub_regions=" + sub_regions);
        	location.href = "BizIndex.asp?Cat_ID=" + catid + "&pos=" + recnum + "&ParentID=" + parentid  + "&sub_regions=" + sub_regions;
		}
    }//,
    //onFailure: function(){ jQuery('#quickSearchResult').html('There was no result found'); }
  });
}

function getTradieCard(pin,e)
{
    var key;

    if(window.event)
       key = window.event.keyCode;     //IE
    else
       key = e.which;     //firefox
	if (key == 13) {
		
		new Ajax.Request('AjaxServer.asp',
		{
			method:'get',
			parameters: {type: 'pin', pin: pin},
			onSuccess: function(data){
				var doc = data.responseXML.documentElement;
				if(doc.getElementsByTagName("card").length >0)
				{
					catid = doc.getElementsByTagName("card")[0].getAttribute("catid");
					parentID = doc.getElementsByTagName("card")[0].getAttribute("parentid")
					regionid = doc.getElementsByTagName("card")[0].getAttribute("regionid")
					recnum = doc.getElementsByTagName("card")[0].getAttribute("recnum")
					location.href = "MyTradieAd.asp?Cat_ID=" + catid + "&pos=" + recnum + "&ParentID=" + parentID  + "&sub_regions=" + regionid + "&pin="+ pin;
				}
				else
				{
					jQuery('#tradieResult').html('There was no result found');
				}
				
			},
			onFailure: function(){

				jQuery('#tradieResult').html('There was no result found');
			}
		});
	}//key
}

var isLoadingTradieSearch = 0;
function searchBusinessByPinOrName(value){	
	if(value.trim()==""){
		jQuery('#div_Tradie').show();
		jQuery("#tradieResult").show();
		jQuery("#div_Tradie").html('');
		jQuery("#tradieResult").html('');
	
		jQuery('#div_Tradie').hide();
		jQuery('#div_Tradie_Out').hide();
		jQuery("#loadTradieCtr").hide();
		jQuery("#tradieResult").hide();
		isLoadingTradieSearch = 0;
		return;
	}
	jQuery("#loadTradieCtr").show();
	if(isLoadingTradieSearch==0){
		isLoadingTradieSearch = 0;
		if(isInteger(value))
		{
			if(value.substring(0,2) != '04')
			{
				jQuery("#loadTradieCtr").hide();
				jQuery("#tradieResult").hide();	
				jQuery('#div_Tradie').hide();
				jQuery('#div_Tradie_Out').hide();
				jQuery("#loadTradieCtr").hide();			
				isLoadingTradieSearch = 0;
				return;
			}
			else
			{
				if(value.length <3)
				{
					jQuery("#loadTradieCtr").hide();
					jQuery("#tradieResult").hide();	
					jQuery('#div_Tradie').hide();
					jQuery('#div_Tradie_Out').hide();
					jQuery("#loadTradieCtr").hide();								
					isLoadingTradieSearch = 0;
					return;
				}
			}
			getBusinessByPin(value);
		}
		else
		{
			getBusinessesByName(value);

		}
	}
}
function getBusinessByPin(pin)
{
    jQuery("#div_Tradie").hide();
	jQuery("#div_Tradie_Out").hide();
	
	new Ajax.Request('AjaxServer.asp',
		{
			method:'get',
			parameters: {type: 'pin', pin: pin},
			onSuccess: function(data){
				var doc = data.responseXML.documentElement;
				if(doc.getElementsByTagName("card").length > 0)
				{
				    alert("val");
					jQuery("#div_Tradie").html('');
					jQuery("#tradieResult").html('');
					var ddl = "<select  class='cb_corner' id='ddlPin' onclick='javascript:chooseBusiness(this.value);' size='4' >"
					for(var i=0; i < doc.getElementsByTagName("card").length; i++)
					{
						var style =""
		
						style ="background-color:#F6F6F6;color:#616161;font-weight:normal";
						
						ddl += "<option value='" + doc.getElementsByTagName("card")[i].getAttribute("pin") + "' style='" + style + "'>" + doc.getElementsByTagName("card")[i].getAttribute("pin") + "</option>";
		
					}//for
					ddl += "</select>";

					jQuery("#div_Tradie").html(ddl);
				
					jQuery('#div_Tradie').show();
					jQuery("#tradieResult").show();
					jQuery('#div_Tradie_Out').show();
					jQuery("#loadTradieCtr").hide();
				}
				else
				{
				    				    alert("NOval");

					jQuery("#div_Tradie").hide();
					  jQuery("#div_Tradie_Out").hide();
					  jQuery("#loadTradieCtr").hide();		  
					jQuery('#tradieResult').html('There was no result found');
				}
				isLoadingTradieSearch = 0;
				
			},
			onFailure: function(){
				jQuery("#loadTradieCtr").hide();
				jQuery('#tradieResult').html('There was no result found');
				isLoadingTradieSearch = 0;
			}
		});
}

function getBusinessesByName(name){
	jQuery("#div_Tradie").hide();
	jQuery("#div_Tradie_Out").hide();
	jQuery("#loadTradieCtr").show();
	new Ajax.Request('AjaxServer.asp',
   {
    method:'get',
    parameters: {type: 'bn', bizName: name},
    onSuccess: function(data){
        var doc = data.responseXML.documentElement;
        if(doc.getElementsByTagName("biz").length > 0)
		{
			jQuery("#div_Tradie").html('');
					jQuery("#tradieResult").html('');
			var ddl = "<select  class='cb_corner' id='ddlBizName' onclick='javascript:chooseBusiness(this.value);' size='4' >"
			for(var i=0; i < doc.getElementsByTagName("biz").length; i++)
			{
				var style =""

				style ="background-color:#F6F6F6;color:#616161;font-weight:normal";
				
				ddl += "<option value='" + doc.getElementsByTagName("biz")[i].getAttribute("pin") + "' style='" + style + "'>" + doc.getElementsByTagName("biz")[i].getAttribute("name") + "</option>";

			}//for
			ddl += "</select>";

			jQuery("#div_Tradie").html('');
			jQuery("#tradieResult").html('');
			jQuery("#div_Tradie").html(ddl);
			
			jQuery('#div_Tradie').show();
			jQuery("#tradieResult").show();
			jQuery('#div_Tradie_Out').show();
			jQuery("#loadTradieCtr").hide();			
		}
		else
		{
		  jQuery("#div_Tradie").hide();
		  jQuery("#div_Tradie_Out").hide();
	 	  jQuery("#loadTradieCtr").hide();		  
		  jQuery('#tradieResult').html('There was no result found');
		}
		isLoadingTradieSearch = 0;
    },
    onFailure: function(){ 
		jQuery('#tradieResult').html('There was no result found'); 
		jQuery('#loadTradieCtr').hide();
		isLoadingTradieSearch = 0;
	}
  });
}

function chooseBusiness(biz)
{

		new Ajax.Request('AjaxServer.asp',
		{
			method:'get',
			parameters: {type: 'selectpin', pin: biz},
			onSuccess: function(data){
				
				var doc = data.responseXML.documentElement;

				if(doc.getElementsByTagName("card").length >0)
				{
					catid = doc.getElementsByTagName("card")[0].getAttribute("catid");
					parentID = doc.getElementsByTagName("card")[0].getAttribute("parentid")
					regionid = doc.getElementsByTagName("card")[0].getAttribute("regionid")
					recnum = doc.getElementsByTagName("card")[0].getAttribute("recnum")
					location.href = "MyTradieAd.asp?Cat_ID=" + catid + "&pos=" + recnum + "&ParentID=" + parentID  + "&sub_regions=" + regionid + "&pin="+ biz;
				}
				else
				{
					//jQuery('#BizNameResult').html('There was no result found');
				}
				
			},
			onFailure: function(){
//				alert("TradieFinder has no further information about this business.");
				//jQuery('#BizNameResult').html('There was no result found');
				alert('Sorry! This business is not available.');
			}
		});
}
jQuery(document).ready(function(){
	//global vars
	var searchBoxes = jQuery(".text");
	var searchBox1 = jQuery("#txtTradieCard");
	var searchBox2 = jQuery("#txt1");
	var searchBox3 = jQuery("#txtCat");
	var searchBizName = jQuery("#txtBusinessName");
	var searchBox2Default = "Postcode search";
	var searchBox1Default = "Business name or mobile";
	var searchBox3Default = "Enter Category";
	var searchBizNameDefault = "Enter Business's Name";
	//Effects for both searchbox
	searchBoxes.focus(function(e){
		jQuery(this).addClass("active");
	});
	searchBoxes.blur(function(e){
		jQuery(this).removeClass("active");
	});

	//Searchbox1, set focus when document is ready
	searchBox1.focus(function(){
		if(jQuery(this).attr("value") == searchBox1Default) jQuery(this).attr("value", "");
	});
	searchBox1.blur(function(){
		if(jQuery(this).attr("value") == "") jQuery(this).attr("value", searchBox1Default);
	});

	//Searchbox2 show/hide default text if needed
	searchBox2.focus(function(){
		if(jQuery(this).attr("value") == searchBox2Default) jQuery(this).attr("value", "");
	});
	searchBox2.blur(function(){
		if(jQuery(this).attr("value") == "") jQuery(this).attr("value", searchBox2Default);
	});
	searchBox3.focus(function(){
		if(jQuery(this).attr("value") == searchBox3Default) jQuery(this).attr("value", "");
	});
	
	searchBizName.focus(function(){
		if(jQuery(this).attr("value") == searchBizNameDefault) jQuery(this).attr("value", "");
	});
	searchBizName.blur(function(){
		if(jQuery(this).attr("value") == "") jQuery(this).attr("value", searchBizNameDefault);
	});
});

function focusIn(){
	document.getElementById("txt1").focus( );
}

function overText(div_value) {
	div_value.className = 'over';
}
function outText(div_value) {
	div_value.className = 'normal';
}

function setText(value) {
	document.getElementById('txt1').value = value;
	hide_divs();
	document.getElementById('txtPostCode').innerHTML = '';
}

function show_div(div_id) {
	document.getElementById(div_id).style.display = 'block';
}

function hide_divs() {
	document.getElementById('txtPostCode').style.display = 'none';
	document.getElementById('close').style.display = 'none';
}
function show_hide_region()
{
	if(jQuery('#txtPostCode').html() != "")
	{
		if(jQuery('#txtPostCode').is(":visible"))
		{
			jQuery('#txtPostCode').hide();
			jQuery('#div_PostCode_Out').hide();
			jQuery('#imgShowHide').attr('src','images/down_icon.gif');
			if(sub_regions != '')
				jQuery('#divCat').show();
		}else{

			jQuery('#txtPostCode').show();
			jQuery('#div_PostCode_Out').show();
			jQuery('#imgShowHide').attr('src','images/up_icon.gif');
			jQuery('#divCat').hide();
			jQuery('#cat').hide();
			jQuery('#cat_out').hide();
			jQuery('#txtCat').val('');
			jQuery('#quickSearchResult').html('');
		}
	}
}

function show_hide_business(){
	if(jQuery('#div_BizName').html() != "")
	{
		if(jQuery('#div_BizName').is(":visible"))
		{
			jQuery("#div_BizName").hide();
 			jQuery("#div_BizName_Out").hide();
			jQuery('#BizNameResult').hide();
		}
		else{
			jQuery("#div_BizName").show();
 			jQuery("#div_BizName_Out").show();
			jQuery('#BizNameResult').show();
		}
	}
}

function setDefault()
{
	jQuery('#txtTradieCard').attr("value", "Business name or mobile");
	jQuery('#txt1').attr("value", "Postcode search");
	jQuery('#div_PostCode_Out').hide();
	jQuery('#txtCat').attr("value", "Enter Category");
	jQuery('#divCat').hide();
	jQuery('#cat_out').hide();
	jQuery('#quickSearchResult').hide();
	jQuery('#tradieResult').hide();
	
	jQuery("#div_Tradie").html('');
	jQuery("#tradieResult").html('');

	jQuery('#div_Tradie').hide();
	jQuery('#div_Tradie_Out').hide();
	jQuery("#loadTradieCtr").hide();
	jQuery("#loadPostCodeCtr").hide();
	jQuery("#imgCatLoading").hide();
}

function doChangeTooltip(type){
	var flashMovie=getFlashMovieObject("mymovie");
	var strText = "";
	if(type==1){
		strText = "You may have seen this feature on a business's promotion. Choosing a business from here will direct you straight to the business's mini webpage, without having to search through other businesses. Just enter the business's name or mobile phone number";
	}else if(type==2){
		strText = "This allows you to perform a quick postcode and category based search";
	}else{
		strText = "Please locate the area where service is required! Simply move the cursor over the map and click on the state, the region and/or sub-regions, then click next. It's that easy! You can also use the quick search or perform a MyTradie search";
	}
	
	//flashMovie.SetVariable("/:smart.txt1", strText);

	//alert(mymovie);
}
function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}



