// JavaScript Document
	function mouseOn (o)
	{
		//alert(o);
		o.style.backgroundColor='#ddf0f7';
	}
	
	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 del_selected()
	{
		var a;
		a = confirm("Are you sure you want to delete the selected item(s)?");
		if(a)
		{
			_get("frmList").submit();
		}
	}
	
	function mail_selected(){
		var frm = document.getElementById("frmList");
		var nm;
		var arr = new Array();
		var j=0; var st = "";
		for (i=0; i<frm.elements.length; i++)
		{
			nm = frm.elements[i].name;
			if(nm.substr(nm,4)=="chk_")
			{
				if(frm.elements[i].checked===true)
				{
					arr[j] = frm.elements[i].value;
					j++;
				} 
			} 
			else 
			{
				window.location.href = 'mail.php';
			}
		}
		if(arr.length>0)
		{
			for (j=0; j<arr.length; j++)
			{
				 st += arr[j]+",";
			}
		}
		window.location.href = 'mail.php?mail_id='+st;
	}
	
	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_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 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);
	} 
	
	function changeYear(y){
		window.location.href='?year='+y;
	}
	
	
	function delete_image(img1,img2)
	{
		var a;
		a = confirm("Are you sure you want to delete the selected image(s)?");
		if(a)
		{
			total_image = 'delete.php?file1='+img1+'&file2='+img2;
			window.open(total_image,'pu','top=0,left=0,width=1,height=1'); 
		}
	}