
$j(document).ready(function() {					
	$j(function() {
		$j('#templatemenu').corner("round 10px");
	});
});
 
function goToProfile(form) {
	//get the selcted Agency
	var numID = form.options[form.selectedIndex].value;
	//check if the id is a valid number
	if(isNaN(numID)){
		return false;
	} else {
		//go to the agency page
		parent.window.location.href = 'http://www.my-ijob.com/agencyprofile.asp?AG_ID=' + numID
		return false;	
	}
}

function toggleDisplay(numRanges,num,strRangeID,strTabID) {
       
	//Set Range ID to check if it exists
	var temp = document.getElementById(strRangeID + num)
	
	if(temp) {
		var row = document.getElementById(strRangeID + num);
	}
	//alert('hello'+num);
	
	//Let's assume there are 10 job status at the max and reset all of it's layers display to none
	for(var j=0; j <= numRanges; j++)
	{ 
        if(document.getElementById(strRangeID+j)){
			document.getElementById(strRangeID+j).style.display = 'none';  
			document.getElementById(strTabID+j).className = 'off';  
        } 
    }
    if(temp) {
    //Let's show the layer corresponding to the option checked.
    row.style.display = "block";
	document.getElementById(strTabID+num).className = 'active';  
    }
}
