	/**
	  *		These are the javascript functions that are used in different files.
	  *		These are collective functions for all falls.
	*/
	  
	 /**
	   *mailBackToHom function shows popup window email news.
	   *@param newsNumber variable of news number. 
	   *@return window that contain the speicific news that pass to the function and get all news of that specific id.
	*/
	function mailBackToHom(newsNumber)
	{
		window.location = 'email_news.php?newsnumber='+newsNumber+'&emailItem=email&returnHome=OK';
		//window.open('email_news.php?newsnumber='+newsNumber+'&emailItem=email','popup',"Chat","toolbar=no,location=no,directories=no,status=no,		menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=550,height=540,screenX=150,screenY=150,top=150,left=150"); 
	}
	/**
	   * check223 function shows popup window email news.
	   *@param newsNumber variable of news number. 
	   *@return window that contain the speicific news that pass to the function and get all news of that specific id.
	*/
	function check223(newsNumber)
	{
		window.open('email_news.php?newsnumber='+newsNumber+'&emailItem=email','popup',"Chat","toolbar=no,location=no,directories=no,status=no,		menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=550,height=540,screenX=150,screenY=150,top=150,left=150"); 
	}
	/**
	   * check22 function shows popup window meeting agenda.
	   *@param asd variable of number. 
	   *@return window that contain the speicific agenda that pass to the function and get the meeting agenda of that specific id.
	*/
	function check22(asd)
	{
		window.open('meeting_agenda.php?check22='+asd,'popup','Agenda','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=no,copyhistory=no,width=550,height=540,screenX=150,screenY=150,top=150,left=150'); 
	 }
	/**
	   *function CopyToClip() copy to clipboard.
	   *@return get specific div and run the cmd commands and also set the content not editable.
	*/
	function CopyToClip()
	{ 
		var div = document.getElementById('DivtoCopy'); 
   		div.contentEditable = 'true'; 
   		var controlRange; 
   		if (document.body.createControlRange) 
		{ 
			 controlRange = document.body.createControlRange(); 
			 controlRange.addElement(div); 
			 controlRange.execCommand('Copy'); 
   		} 
   		div.contentEditable = 'false'; 
	}
	 /**
	   *change_val function set the sorting order
	   *@return set the values of sorting order either it is asc or desc
	*/
	function change_val()
	{
		document.getElementById("showonload").style.display="none";
		aa = document.abc.sorting.value ;
		if(aa == "desc") 
		{
			document.abc.sorting.value  = "asc";
		}
		else if(aa == "asc") 
		{
			document.abc.sorting.value  = "desc";
		}
	}
	 /**
	   *change_val1 function set the sorting order
	   *@return set the values of sorting order either it is asc or desc
	*/
	function change_val1()
	{
		document.getElementById("showonload1").style.display="none";
		aa = document.abc.sorting.value ;
		if(aa == "desc") 
		{
			document.abc.sorting.value  = "asc";
		}
		else if(aa == "asc") 
		{
			document.abc.sorting.value  = "desc";
		}
	}
	/**
	   *showHide function shows/hide the specific part of page content.
	   *@param divID show div that is must be hide. 
	   *@param hide variable this is div name that hide the div.
	   *@param show this is div name that going to be show. 
	   *@return set the different status of divs.
	*/
	function showHide(divID,hide,show)
	{
		document.getElementById(divID).style.display="none"; 
		document.getElementById(hide).style.display="none"; 
		document.getElementById(show).style.display="block"; 
	}
	/**
	   *showHide1 function shows/hide the specific part of page content.
	   *@param divID show div that is must be show. 
	   *@param hide variable this is div name that show the div.
	   *@param show this is div name that going to be hide. 
	   *@return set the different status of divs.
	*/
	function showHide1(divID,hide,show)
	{
		document.getElementById(divID).style.display="block"; 
		document.getElementById(hide).style.display="block"; 
		document.getElementById(show).style.display="none"; 
	}
	/**
	   *widget_response function contain the dual response of query processing.
	   *@param query is a simple sql statement that send any widget for processing.
	   *@return dual response first for query execution and other for displaying resultset of query.
	*/
	function widget_response(query)
	{
		new Ajax.Request("hello.php", { 
		 	onSuccess : function(resp) { 
	  			new Ajax.Request("prtotype_frame.php", { 
	 				onSuccess : function(resp) { 
	   					top.frames[0].document.getElementById('new').innerHTML=resp.responseText; 
	 				}, 
					onFailure : function(resp) { 
						alert("No response return by widgets."); 
					}, 
					parameters : "name="+resp.responseText 
				});
	 		}, 
	 		onFailure : function(resp) { 
	   			alert("Outer reponse no come."); 
	 		}, 
	 		parameters : "query="+query});
	}