function servOC()
{
  var trObj1 = (document.getElementById) ? document.getElementById('ihtr1') : eval("document.all['ihtr1']");
  var trObj2 = (document.getElementById) ? document.getElementById('ihtr2') : eval("document.all['ihtr2']");
  var trObj3 = (document.getElementById) ? document.getElementById('ihtr3') : eval("document.all['ihtr3']");
  var trObj4 = (document.getElementById) ? document.getElementById('ihtr4') : eval("document.all['ihtr4']");
  if (document.report0.ChkAgencyEmail.checked)
  {
	if (trObj1 != null) 
		{
			trObj1.style.display="";
		}
	if (trObj2 != null) 
		{
			trObj2.style.display="";
		}
	if (trObj3 != null) 
		{
			trObj3.style.display="";
		}
	if (trObj4 != null) 
		{
			trObj4.style.display="";
		}
  }
  else
  {
	if (trObj1 != null) 
		{
			trObj1.style.display="none";
		}
	if (trObj2 != null) 
		{
			trObj2.style.display="none";
		}
	if (trObj3 != null) 
		{
			trObj3.style.display="none";
		}
	if (trObj4 != null) 
		{
			trObj4.style.display="none";
		}
  }
}

	function PopulateArea(o)		
	{		
		d=document.getElementById('Area');
		if(!d){return;}			
		d.options.length=0;
		document.getElementById('Suburb').options.length=0;
		cur=Areas[o.options[o.selectedIndex].value];
		if(!cur){return;}
		d.options.length=cur.length+1;
		d.options[0].text='<-- Select Area -->';
		d.options[0].value='';
		for(var i=0;i<cur.length;i++)
		{
			d.options[i+1].text=cur[i];
			d.options[i+1].value=cur[i];
		}
	}

	function PopulateSuburb(o)		
	{		
		d=document.getElementById('Suburb');
		if(!d){return;}			

		d.options.length=0;
		pro=document.getElementById('Province');
		cur=Suburbs[pro.options[pro.selectedIndex].value,o.options[o.selectedIndex].value];
		if(!cur){return;}
		d.options.length=cur.length+1;
		d.options[0].text='<- All ->';
		d.options[0].value='';
		for(var i=0;i<cur.length;i++)
		{
			d.options[i+1].text=cur[i];
			d.options[i+1].value=cur[i];
		}
	}

	function PopulateAgencyEmail(o)		
	{		
		d=document.getElementById('AgencyEmail');
		if(!d){return;}			
		d.options.length=0;
		pro=document.getElementById('Province');
		cur=AgencyEmails[pro.options[pro.selectedIndex].value,o.options[o.selectedIndex].value];
		if(!cur){return;}
		d.options.length=cur.length;
		for(var i=0;i<cur.length;i++)
		{
			d.options[i].text=cur[i];
			d.options[i].value=cur[i];
		}
	}

function trim(str)
{
   return str.replace(/^\s*|\s*$/g,"");
}
	
var clickmessage="Hello, Hello .... What are you trying to do with our images??"

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()

function bookmark(url, description)
{
netscape="Netscape User's hit CTRL+D to add a bookmark to this site.";
if (navigator.appName=='Netscape')
{
alert(netscape);
}
else if (navigator.appName=='Microsoft Internet Explorer')
{
window.external.AddFavorite(url, description);
}

}

function validate_form()
{
    valid = true;
    if (trim(document.report0.name.value) == '' )
    {
        alert ( "Please enter the Name." );
        document.report0.name.focus();
        valid = false;
	    return valid;
    }    
	xyz=document.report0.email.value;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!filter.test(xyz))
	{
        alert ( "Invalid Email ID. Please enter correct email ID." );
        document.report0.email.focus();
        valid = false;
	    return valid;
    }	
    if (trim(document.report0.Pasword.value) == '' )
    {
        alert ( "Please enter the Password." );
        document.report0.Pasword.focus();
        valid = false;
	    return valid;
    }
    if ( document.report0.SecretQuestion.selectedIndex < 1 )
    {
        alert ( "Please select the Secret Question." );
        document.report0.SecretQuestion.focus();
        valid = false;
	    return valid;
    }
    if (trim(document.report0.Answer.value) == '' )
    {
        alert ( "Please enter the Answer." );
        document.report0.Answer.focus();
        valid = false;
	    return valid;
    }
    if ( document.report0.Province.selectedIndex < 1 )
    {
        alert ( "Please select the Province." );
        document.report0.Province.focus();
        valid = false;
	    return valid;
    }
    if ( document.report0.Area.selectedIndex < 1 )
    {
        alert ( "Please select the Area." );
        document.report0.Area.focus();
        valid = false;
	    return valid;
    }
	    return valid;
}