// JavaScript Document
	function mouseOn (o)
	{
		//alert(o);
		o.style.backgroundColor='#eeeeee';
	}
	
	function mouseOut (o)
	{
		o.style.backgroundColor='';
	}
	
	function check_uncheck(v)
	{
		var frm = document.getElementById("frmList");
		var nm;
		for (i=0; i<frm.elements.length; i++)
		{
			nm = frm.elements[i].name;
			if(nm.substr(nm,4)=="chk_")
			{
				frm.elements[i].checked = v;
			}
		}
	}
	
	function popup(url) 
	{
		//alert(url);
		 params  = 'width='+screen.width;
		 params += ', height='+screen.height;
		 params += ', top=0, left=0'
		 params += ', status=1,scrollbars=1,resizable=1'
		 /* params += ', toolbar=1,location=1,menubar=1,directories=1,copyhistory=1'*/
		 params += ', fullscreen=yes';
		
		 newwin=window.open(url,'windowname4', params);
		 if (window.focus) {newwin.focus()}
		 return false;
	}
	
	/* Newly Added By Subho For Calendar */
	
	function show_calendar(id){
	//alert(id);
	mCal = new dhtmlxCalendarObject(id, true, {isWinHeader:true,headerButtons: 'TX',isWinDrag:false});  
	mCal.show();
	mCal.setSkin(""); 
	mCal.setDateFormat("%M %d, %Y");
	}
	
	/* EO Newly Added By Subho For Calendar */
	
	
	
	function del_selected()
	{
		var a;
		a = confirm("Are you sure you want to delete the selected item(s)?");
		if(a)
		{
	 		_get("frmList").submit();
		}
	}
	
	function delete_record(s)
	{
		var a = confirm("Are you sure you want to delete the selected record?");
		
		if(a)
		{
			window.location.href='?delete='+s;
		}
	}
	
	function delete_candidate (s) {
		var a = confirm("Are you sure you want to delete the selected Interviewer/Candidate");
		if (a) {
			window.location.href='?delete_candidate='+s;
		}
	}
	
	function verify_email (id) {
		var a = confirm("Are you sure you want to verify this candidate's email");
		if (a) {
			window.location.href='?verify_email='+id;
		};
	}
		
	function listall() {
		window.location.href='?listall=1';
	}
	function show_deleted_candidates (s) {
		if (!s) {
				window.location.href='?show_deleted=1';
		};
		if (s) {
			window.location.href='?show_deleted=0';
		};
		
	
	}
	
	function export_to_xls () {
		window.location.href='?export=1';
	}
	function delete_record_new(s,i)
	{
		var a = confirm("Are you sure you want to delete the selected record?");
		
		if(a)
		{
			window.location.href='?delete='+s+'&id='+i;
		}
	}
	
	function retrieve_record(s)
	{
		var a = confirm("Are you sure you want to retrieve the selected record?");
		
		if(a)
		{
			window.location.href='?retrieve='+s;
		}
	}
	
	function deactivate_record(s,d)
	{
		var a = confirm("Are you sure you want to deactivate the selected "+d+"?");
		
		if(a)
		{
			window.location.href='?deactivate='+s;
		}
	}
	
	function activate_record(s,d)
	{
		var a = confirm("Are you sure you want to activate the selected "+d+"?");
		
		if(a)
		{
			window.location.href='?activate='+s;
		}
	}
	
	function disable_record(s,d)
	{
		var a = confirm("Are you sure you want to disable the selected "+d+"?");
		if(a)
		{
			window.location.href='?disable='+s;
		}
	}
	
	function edit_record(s)
	{
		window.location.href='?edit='+s;
	}
	
	function show_record(s)
	{
		window.location.href='?view='+s;
	}
	function show_record_bed(s)
	{
		window.location.href='?view_bed='+s;
	}
	function display(s)
	{
		window.location.href='?site_record='+s;
	}
	
	function edit_record_new(s,p)
	{
		window.location.href='?edit='+s+'&package='+p;
		//alert('?edit='+s+'&package='+p);
	}
	
	// new function By Subho
	function editmenu(id)
	{
	   mywindow = window.open ("edit_menu.php?edit="+id,"mywindow","location=1, status=1, scrollbars=1, width=600,height=400");
	   mywindow.moveTo(300,100);
	} 
	
	function editpage(id)
	{
	   mywindow = window.open ("edit_page.php?edit="+id,"mywindow","location=1, status=1,  		       scrollbars=1, width=800,height=600");
	   mywindow.moveTo(100,100);
	} 
	
	
	function editsubpage(id,page_id)
	{
	   mywindow = window.open ("edit_sub_page.php?edit="+id+"&page_id="+page_id,"mywindow","location=1, status=1,scrollbars=1, width=800,height=600");
	   mywindow.moveTo(100,100);
	} 
	
	function editevent(id)
	{
	   mywindow = window.open ("edit_event.php?edit="+id,"mywindow","location=1, status=1,  		       scrollbars=1, width=800,height=600");
	   mywindow.moveTo(100,100);
	} 
	
	function editsidebar(id,stype)
	{
	   mywindow = window.open ("edit_sidebar.php?edit="+id+"&stype="+stype,"mywindow","location=1, status=1,scrollbars=1, width=800,height=600");
	   mywindow.moveTo(100,100);
	} 
