/**
 * Name: scripts/page.js
 * Author: Abhishek Dilliwal (abhishekdilliwal@yahoo.com)
 * Date: 22 Sept 2008
 * Description: Page specific javascripts
 */
 
function change_nvtab(tab_id){
	var btn = "nvparent_" + tab_id;
	var content = "nvchild_" + tab_id;
	var active_btn = document.getElementById(btn);
	var i = 0;
 	var btn_all = document.getElementById("topnav_parent").getElementsByTagName("a");
 	for(i=0;i<btn_all.length;i++){
 		if(btn_all[i].className == "glow active"){
 			btn_all[i].className = "glow";
 			continue;
 		} 
 		if(btn_all[i].className == "glow"){
 			continue;
 		} 		
 		btn_all[i].className ="";
 	}
 	if(document.getElementById(btn).className != "glow"){
 		document.getElementById(btn).className = "active";
 	}
 	else{
 		document.getElementById(btn).className = "glow active";
 	}

 	var content_all = document.getElementById("topnav_child_content").getElementsByTagName("div");
 	var hide_me;
 	for(i=0;i<content_all.length;i++){
 		if(content_all[i].className == "show"){
 			//alert(content_all[i]);
 			hide_me = content_all[i];
 			break;
 		}
 	}
 	//jQuery(hide_me).hide("slow");
 	jQuery(hide_me).animate({height: "hide"},300); 	
 	hide_me.className = "hide";
 	var temp_content = "#" + content;
 	jQuery(temp_content).show(300);
 	document.getElementById(content).className = "show";
 		
}

function gothere(){
	var list = document.getElementById('select_url');
	location.href = list.options[list.selectedIndex].value
}

$(document).ready(function(){
	  $("input").focus(function(){
	  	$(this).css({'border' : '1px solid black'});
	  	$(this).css({'background-color' : '#FFFFCC'});
	  });
	  $("input").blur(function(){
	  	$(this).css({'border' : '1px solid #2D71A2'});
	  	$(this).css({'background-color' : '#FFFFFF'});
	  });   
	  $(".input_em").focus(function(){
		  $(this).css({'border' : '1px solid black'});
		  $(this).css({'background-color' : '#FFFFCC'});
	  });
	  $(".input_em").blur(function(){
		  $(this).css({'border' : '1px solid #2D71A2'});
		  $(this).css({'background-color' : '#FFFFFF'});
	  });   
});	