	function redirect(url){

		window.location = url;

	}

	function is_number(number){

	   var ValidChars = "0123456789.";

	   var IsNumber=true;

	   var Char;								

	 

	   for (i = 0; i < number.length && IsNumber == true; i++) 

		  { 

		  Char = number .charAt(i); 

		  if (ValidChars.indexOf(Char) == -1) 

			 {

				IsNumber = false;											

			 }

		  }

	   return IsNumber;

	   

	 }

	function is_email(str)

	{

		var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z])?)$/i

		if (filter.test(str)){

			return true;

		}else{

			return false

		}

	}



	function check_all(obj, checked) {

			var _checked = (checked == 0) ? false : true;

			

			num_item = (obj).length;

			if (num_item > 1) {

				for (i = 0; i < num_item; i++) {

					obj[i].checked = _checked;

				}

			}

			else {

				obj.checked = _checked;

			}

	}



	

	function do_search() {

			document.frm_list.op.value = 'search';

			document.frm_list.submit();

	}

	

	function do_reset() {

			document.frm_list.op.value = 'reset';

			document.frm_list.submit();

	}

	

	function do_update_orders() {

			document.frm_list.op.value = 'orders';

			document.frm_list.submit();

	}

		

	function do_publish(_id) {			

			document.frm_list.op.value = 'publish';

			document.frm_list.id.value = _id;

			document.frm_list.submit();

	}

	

	function do_publishs() {

			document.frm_list.op.value = 'publishs';

			document.frm_list.submit();

	}

	

	function do_un_publish(_id) {

			document.frm_list.op.value = 'un_publish';

			document.frm_list.id.value = _id;

			document.frm_list.submit();

	}

	

	function do_un_publishs() {

			document.frm_list.op.value = 'un_publishs';

			document.frm_list.submit();

	}

	function do_delete(_id,message) {

		var _confirm = confirm(message);

		if (_confirm) {

			document.frm_list.op.value = 'del';

			document.frm_list.id.value = _id;

			document.frm_list.submit();

		}

	}

	function do_deletes(message) {

		var _confirm = confirm(message);

		if (_confirm) {

			document.frm_list.op.value = 'dels';

			document.frm_list.submit();

		}

	}

	

	function popup(url,width,height)

	 {

	   mywindow = window.open (url,"mywindow","location=0,status=0,scrollbars=1,width=" + width + ",height=" +height);

	   mywindow.moveTo(300,300);

	 } 

	 

	function GetXmlHttpObject(){

	var XMLHttp = null;
	// active x internetexplorer ---------------------------------------------------------

	try	{

		XMLHttp = new ActiveXObject('MSXML2.XMLHTTP.3.0'); // ie7

	}catch (e){

				try	{

					XMLHttp = new ActiveXObject("Msxml2.XMLHTTP"); //ie 6

				}catch(e){

				try{

					XMLHttp = new ActiveXObject("Microsoft.XMLHTTP");//ie older versions

				}catch(e){

			

			}	

	}

	}

	// active x internetexplorer ---------------------------------------------------------

	

	if (XMLHttp == null)

	{

	XMLHttp = new XMLHttpRequest();

	}

	return XMLHttp; 

	}

