function show_control(module,tab,project){
	  new GAjax().send('/web/control/'+module+'/index.php',
		"project="+project+
        "&tab="+tab
        ,					 
	function(xhr){

            $E('module').innerHTML = xhr.responseText;
            xhr.responseText.evalScript();
        });
	
}

function save(module,todo,id){
	                 
	if(todo!='editgroup'){
    
     var check_groupstatus=jQuery('#groupstatus').is(':checked');
     if(check_groupstatus==true){
       var groupstatus=1;
     }else{
       var groupstatus=0;  
     }
        
	new GAjax().send('/web/control/'+module+'/save.php',
		"module="+module+
		"&groupid="+id+
		"&id="+id+
		"&groupname="+jQuery('#groupname').val()+
		"&groupdes="+jQuery('#groupdes').val()+
		"&groupstatus="+groupstatus+
		"&grouplist="+jQuery('#grouplist').val()+
		"&order_num="+jQuery('#order_num').val()+
		"&project="+jQuery('#project').val()+
		"&todo="+todo
		,		

	function(xhr){

            $E('module').innerHTML = xhr.responseText;
            xhr.responseText.evalScript();
        });
       
	}else{
		
		var show = 'show_edit_'+id;
		new GAjax().send('/web/control/'+module+'/save.php',
		"module="+module+
		"&id="+id+
        "&project="+jQuery('#project').val()+ 
		"&position="+jQuery('#position3').val()+
		"&block_name="+jQuery('#block_name').val()+
		"&block_type="+jQuery('#block_type').val()+
		"&selectmodule="+jQuery('#selectmodule3').val()+
		"&block_code="+jQuery('#block_code').val()+
		"&groupname="+jQuery('#groupname_edit').val()+
		"&groupdes="+jQuery('#groupdes_edit').val()+
		"&groupstatus="+jQuery('#groupstatus_edit').val()+
		"&grouplist="+jQuery('#groupslist_edit').val()+
		"&todo="+todo
		,		

	function(xhr){

            $E(show).innerHTML = xhr.responseText;
            xhr.responseText.evalScript();
        });
	}
     	
	
}

function save_status(module,todo,id,project){
    
    show_status= 'show_status_'+id;
    new GAjax().send('/web/control/'+module+'/save.php',
        "module="+module+
        "&id="+id+
        "&todo="+todo
        ,        
    function(xhr){

            $E(show_status).innerHTML = xhr.responseText;
            xhr.responseText.evalScript();
        });   
    show_column(project);
}


function show_edit(module,todo,id){
	
	switch(todo){
		case "editgroup":
		
			var show = 'show_edit_'+id;
			
			new GAjax().send('/web/control/'+module+'/show.php',
				"module="+module+
				"&id="+id+ 
				"&todo="+todo
				,					 
			function(xhr){
		
					$E(show).innerHTML = xhr.responseText;
					xhr.responseText.evalScript();
				});
		break;
		case "editlist":
			showtab('#tab4');
			new GAjax().send('/web/control/'+module+'/show.php',
				"module="+module+
				"&id="+id+ 
				"&todo="+todo
				,					 
			function(xhr){
		
					$E('tab4').innerHTML = xhr.responseText;
					xhr.responseText.evalScript();
				});
		break;
		case "editproject":
			
			var show = 'show_edit_'+id;
			
			new GAjax().send('/web/control/'+module+'/show.php',
				"module="+module+
				"&id="+id+ 
                "&project="+jQuery('#project').val()+
                "&todo="+todo
				,					 
			function(xhr){
		
					$E(show).innerHTML = xhr.responseText;
					xhr.responseText.evalScript();
				});
		break;
		case "editdesign":
			
			new GAjax().send('/web/control/'+module+'/show.php',
				"module="+module+
				"&id="+id+
				"&todo="+todo
				,					 
			function(xhr){
		
					$E('show_project_module').innerHTML = xhr.responseText;
					xhr.responseText.evalScript();
				});
		break;
		case "editrss":
			
			new GAjax().send('/web/control/'+module+'/show.php',
				"module="+module+
				"&id="+id+
				"&todo="+todo
				,					 
			function(xhr){
		
					$E('show_project_module').innerHTML = xhr.responseText;
					xhr.responseText.evalScript();
				});
		break;
	}
}


function saveOnLoad(module,tab,project){
	setTimeout( function() {
	 show_control(module,tab,project);
	},1500);
	
}

function submit_form(form,module,tab,project){
    
	 new GForm(form).onsubmit(function(xhr){
		resa = xhr.responseText;           			   
        switch(module){
        case "edoc":
        
            if(form=='addedoc'){
                
                if(document.forms.addedoc.group.selectedIndex == 0)    //index of "------" is 0
                {
                    alert("โปรดเลือก หมวดหมู่เอกสาร");
                    return false;
                }
                if(document.forms.addedoc.title.value == "")
                {
                    alert("กรุณา กรอกหัวข้อเอกสาร");
                    document.forms.addedoc.title.select();    //place cursor on the input box
                    return false;
                }
            }else{
                
                if(document.forms.editedoc.group.selectedIndex == 0)    //index of "------" is 0
                {
                    alert("โปรดเลือก หมวดหมู่เอกสาร");
                    return false;
                }
                if(document.forms.editedoc.title.value == "")
                {
                    alert("กรุณา กรอกหัวข้อเอกสาร");
                    document.forms.editedoc.title.select();    //place cursor on the input box
                    return false;
                }
                
            }
            
        break;
        }
         
		jQuery('#module').html('<div align="center" style="padding-top:100px;">บันทึกข้อมูลเรียบร้อยแล้ว<br/>'+resa+'<br/><img src="../../../images/loadingAnimation.gif"/></div>');							   
		setTimeout( function() {
			show_control(module,tab,project);
		},5500);
		
	});
	
	switch(module){
		case "project":
			show_column(project);
		break;
        case "header":
              new GAjax().send('/web/control/'+module+'/show.php',
        "project="+project
        ,                     
    function(xhr){

            $E('call_subweb_header').innerHTML = xhr.responseText;
            xhr.responseText.evalScript();
        });
        break;
        case "footer":
              new GAjax().send('/web/control/'+module+'/show.php',
        "project="+project
        ,                     
    function(xhr){

            $E('call_subweb_footer').innerHTML = xhr.responseText;
            xhr.responseText.evalScript();
        });
        break;
	}
	
}


function showtab(id){
 
 		jQuery(".tab_content").hide(); //Hide all content
		jQuery("#ltab4").hide();

		if(id==''){
			
		jQuery("ul.tabs li:first").addClass("active").show(); //Activate first tab
		jQuery(".tab_content:first").show(); //Show first tab content
		
		}else{
		
				if(id=='#tab1'){
					jQuery("#ltab1").addClass("active").show(); //Activ
					jQuery("#tab1").show(); 
					jQuery("#tab2").hide(); 
					jQuery("#tab3").hide(); 
				}if(id=='#tab2'){
					jQuery("#ltab2").addClass("active").show(); //Activ
					jQuery("#tab2").show(); 
					jQuery("#tab1").hide(); 
					jQuery("#tab3").hide(); 
				}if(id=='#tab3'){
					jQuery("#ltab3").addClass("active").show(); //Activ
					jQuery("#tab3").show(); 
					jQuery("#tab1").hide(); 
					jQuery("#tab2").hide(); 
				}
				if(id=='#tab4'){
					jQuery("#ltab4").show();
					jQuery("#ltab4").addClass("active").show(); 
					jQuery("#ltab1").removeClass("active").show();
					jQuery("#tab4").show(); 
					jQuery("#tab1").hide(); 
					jQuery("#tab2").hide(); 
					jQuery("#tab3").hide(); 
				}
		}
		//On Click Event
	/*	jQuery("ul.tabs li").click(function() {
			jQuery("ul.tabs li").removeClass("active"); //Remove any "active" class
			jQuery(this).addClass("active"); //Add "active" class to selected tab
			jQuery(".tab_content").hide(); //Hide all tab content
			var activeTab = jQuery(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
			jQuery(activeTab).fadeIn(); //Fade in the active content
			return false;
		});*/
			jQuery("ul.tabs li").click(function() {
				jQuery("ul.tabs li").removeClass("active");
				jQuery(this).addClass("active");
				jQuery(".tab_content").hide(); 
				if(id=='#tab1'){
					jQuery("#tab1").show(); 
					jQuery("#tab2").hide(); 
					jQuery("#tab3").hide(); 
				}
				if(id=='#tab2'){
					jQuery("#tab2").show(); 
					jQuery("#tab1").hide(); 
					jQuery("#tab3").hide(); 
				}if(id=='#tab3'){
					jQuery("#tab3").show(); 
					jQuery("#tab1").hide(); 
					jQuery("#tab2").hide(); 
				}
				return false;
			});
		
}

function fck(){
	jQuery("textarea.FCKeditor").each(function(){
		var oFCKeditor = new FCKeditor(this.name);
		oFCKeditor.BasePath	= 'web/FCKeditor/' ;
		oFCKeditor.Width = '100%';
		oFCKeditor.Height = '500px';
		oFCKeditor.ReplaceTextarea() ;
	});
}

function browse_page(module,i1,tab,i2,project){
	
	switch(tab){
	 case "#tab1":
		 new GAjax().send('/web/control/'+module+'/index.php',
			"tab="+tab+
			"&page1="+i1+
			"&page2="+i2+
            "&project="+project,					 
		function(xhr){
	
				$E('module').innerHTML = xhr.responseText;
				xhr.responseText.evalScript();
			});
	 break;
	 case "#tab2":
	 	 new GAjax().send('/web/control/'+module+'/index.php',
			"tab="+tab+
			"&page2="+i1+
			"&page1="+i2+
            "&project="+project,                     					 
		function(xhr){
	
				$E('module').innerHTML = xhr.responseText;
				xhr.responseText.evalScript();
			});
	 break;
	 
	}
}

function showimage()
{
	document.images.icons.src="images/"+document.position.block.options[document.position.block.selectedIndex].value+".gif";
	
}
function myshow(id,s) {
	var obj = "";

		// Check browser compatibility
		//alert (id)
		if(document.getElementById)
			obj = document.getElementById(id);
		else if(document.all)
			obj = document.all[id];
		else if(document.layers)
			obj = document.layers[id];
		else
			return 1;
		//alert (obj.style.display)
if (s == 0) {
			obj.style.display ="none" ;
}else if (s == 1){
			obj.style.display ="" ;
		}
}

function checkform(module){
	
	switch(module){
		case "project":
			if(document.forms.position.block.selectedIndex == 0)
			{
				alert(" โปรดเลือกตำแหน่ง โดยท่านสามารถดูตัวอย่างตำแหน่งได้จากภาพด้านซ้ายมือ"); 
				return false;
			}
			if(document.forms.position.number.value == "")
			{
				alert(" โปรดกรอกลำดับการจัดวาง โดยลำดับน้อยจะอยู่บนสุด"); 
				document.forms.position.number.select();	
				return false;
			}
				if(document.forms.position.block_type.value == "")
			{
				alert(" โปรดเลือก การแสดงผลหน้าแรกจาก โมดูล หรือ จะสร้างเองก็สามารถเลือกได้ ..."); 
				document.forms.position.number.select();	
				return false;
			}
		break;
	}
}


function get_block(name){

	var settings 	= name;
			
			var options 	= { portal 			: 'columns', 
								editorEnabled 	: true, 
								saveurl 		: '/web/themes/web/blocks_save.php' };
								
			var data 		= {};
						
			var portal;
					
				portal = new Portal(settings, options, data);
			
}

function show_column(project){

	  new GAjax().send('/web/themes/web/column.php',
		"project="+project
        ,					 
	function(xhr){

            $E('show_column').innerHTML = xhr.responseText;
            xhr.responseText.evalScript();
        });
	
}

//rss
function Inint_AJAX() {
   try { return new ActiveXObject("Msxml2.XMLHTTP");  } catch(e) {} //IE
   try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} //IE
   try { return new XMLHttpRequest();          } catch(e) {} //Native Javascript
   alert("XMLHttpRequest not supported");
   return null;
}

function rssnew(rss_url,rss_show,rss_pic_width) {

		 var req = Inint_AJAX();
		 req.onreadystatechange = function () { 
			  if (req.readyState==4) {
				   if (req.status==200) {
						document.getElementById('rssnew').innerHTML=req.responseText; //รับค่ากลับมา
				   } 
			  }
		 };
		 req.open("GET", "modules/rss/reader_rss.php?rss_url="+rss_url+"&rss_show="+rss_show+"&rss_pic_width="+rss_pic_width); //สร้าง connection
		 req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=tis-620"); // set Header
		 req.send(null); //ส่งค่า


}



function show_type_menu(){
    
    jQuery('#type_menu_url').click(function() {
            jQuery('#show_menu_url').show();
            jQuery('#show_menu_content').hide(); 
    });
    jQuery('#type_menu_content').click(function() {
            jQuery('#show_menu_url').hide();
            jQuery('#show_menu_content').show();
    });
    
    jQuery('#edit_type_menu_url').click(function() {
            jQuery('#edit_show_menu_url').show();
            jQuery('#edit_show_menu_content').hide(); 
    });
    jQuery('#edit_type_menu_content').click(function() {
            jQuery('#edit_show_menu_url').hide();
            jQuery('#edit_show_menu_content').show();
    });
        
}

function control_search(module,tab,project){
   
         new GAjax().send('/web/control/'+module+'/index.php',
            "tab="+tab+
            "&id="+jQuery('#mem_id').val()+  
            "&name="+jQuery('#mem_name').val()+
            "&city="+jQuery('#mem_city1').val()+ 
            "&project="+project,                     
        function(xhr){
    
                $E('module').innerHTML = xhr.responseText;
                xhr.responseText.evalScript();
            });
 
}

function memodule(todo,id,project,memodule,meid){

         var show='se_'+id;
         var show_id='#'+show;
         jQuery(show_id).html('<br/>กำลังโหลด...');
        new GAjax().send('/web/control/member/save.php',
           "id="+id+ 
           "&memodule="+memodule+
           "&meid="+meid+
           "&todo="+todo+  
           "&project="+project+   
           "&module="+jQuery('#member_control').val()  
          ,                  
       function(xhr){
    
                $E(show).innerHTML = xhr.responseText;
                xhr.responseText.evalScript();
          });  

}
    
    var geocoder; // กำหนดตัวแปรสำหรับ เก็บ Geocoder Object ใช้แปลงชื่อสถานที่เป็นพิกัด
var map; // กำหนดตัวแปร map ไว้ด้านนอกฟังก์ชัน เพื่อให้สามารถเรียกใช้งาน จากส่วนอื่นได้
var my_Marker; // กำหนดตัวแปรสำหรับเก็บตัว marker
var GGM; // กำหนดตัวแปร GGM ไว้เก็บ google.maps Object จะได้เรียกใช้งานได้ง่ายขึ้น
function initialize() { // ฟังก์ชันแสดงแผนที่
    GGM=new Object(google.maps); // เก็บตัวแปร google.maps Object ไว้ในตัวแปร GGM
    geocoder = new GGM.Geocoder(); // เก็บตัวแปร google.maps.Geocoder Object

	// รับค่า lat lng จาก form
var	lat_value    =       jQuery("#lat_value").val();  
var	lon_value   =        jQuery("#lon_value").val(); 
var	zoom_value   =        jQuery("#zoom_value").val();  
//alert(lat_value); 
	
    // กำหนดจุดเริ่มต้นของแผนที่
    var my_Latlng  = new GGM.LatLng(lat_value,lon_value);
    var my_mapTypeId=GGM.MapTypeId.ROADMAP; // กำหนดรูปแบบแผนที่ที่แสดง
    // กำหนด DOM object ที่จะเอาแผนที่ไปแสดง ที่นี้คือ div id=map_canvas
    var my_DivObj=jQuery("#map_canvas")[0];
    // กำหนด Option ของแผนที่
    var myOptions = {
        zoom: 13, // กำหนดขนาดการ zoom
        center: my_Latlng , // กำหนดจุดกึ่งกลาง จากตัวแปร my_Latlng
        mapTypeId:my_mapTypeId // กำหนดรูปแบบแผนที่ จากตัวแปร my_mapTypeId
    };
    map = new GGM.Map(my_DivObj,myOptions); // สร้างแผนที่และเก็บตัวแปรไว้ในชื่อ map
    
    my_Marker = new GGM.Marker({ // สร้างตัว marker ไว้ในตัวแปร my_Marker
        position: my_Latlng,  // กำหนดไว้ที่เดียวกับจุดกึ่งกลาง
        map: map, // กำหนดว่า marker นี้ใช้กับแผนที่ชื่อ instance ว่า map
        draggable:true, // กำหนดให้สามารถลากตัว marker นี้ได้
        title:"คลิกลากเพื่อหาตำแหน่งจุดที่ต้องการ!" // แสดง title เมื่อเอาเมาส์มาอยู่เหนือ
    });
    
    // กำหนด event ให้กับตัว marker เมื่อสิ้นสุดการลากตัว marker ให้ทำงานอะไร    
    GGM.event.addListener(my_Marker, 'dragend', function() {
        var my_Point = my_Marker.getPosition();  // หาตำแหน่งของตัว marker เมื่อกดลากแล้วปล่อย
        map.panTo(my_Point); // ให้แผนที่แสดงไปที่ตัว marker        
        jQuery("#lat_value").val(my_Point.lat());  // เอาค่า latitude ตัว marker แสดงใน textbox id=lat_value
        jQuery("#lon_value").val(my_Point.lng());  // เอาค่า longitude ตัว marker แสดงใน textbox id=lon_value 
        jQuery("#zoom_value").val(map.getZoom());  // เอาขนาด zoom ของแผนที่แสดงใน textbox id=zoom_valu            
    });        

    // กำหนด event ให้กับตัวแผนที่ เมื่อมีการเปลี่ยนแปลงการ zoom
    GGM.event.addListener(map, 'zoom_changed', function() {
        jQuery("#zoom_value").val(map.getZoom());   // เอาขนาด zoom ของแผนที่แสดงใน textbox id=zoom_value     
    });

}






 function searchPlace2(val){ // ฟังก์ชัน สำหรับคันหาสถานที่ ชื่อ searchPlace
 
var mySplitResult = val.split("#");
val = mySplitResult[1];
	    var AddressSearch= val;
        if(geocoder){ // ตรวจสอบว่าถ้ามี Geocoder Object 
            geocoder.geocode({
                 address: AddressSearch // ให้ส่งชื่อสถานที่ไปค้นหา
            },function(results, status){ // ส่งกลับการค้นหาเป็นผลลัพธ์ และสถานะ
                  if(status == GGM.GeocoderStatus.OK) { // ตรวจสอบสถานะ ถ้าหากเจอ
                    var my_Point=results[0].geometry.location; // เอาผลลัพธ์ของพิกัด มาเก็บไว้ที่ตัวแปร
                    map.setCenter(my_Point); // กำหนดจุดกลางของแผนที่ไปที่ พิกัดผลลัพธ์
                    my_Marker.setMap(map); // กำหนดตัว marker ให้ใช้กับแผนที่ชื่อ map                    
                    my_Marker.setPosition(my_Point); // กำหนดตำแหน่งของตัว marker เท่ากับ พิกัดผลลัพธ์
                    jQuery("#lat_value").val(my_Point.lat());  // เอาค่า latitude พิกัดผลลัพธ์ แสดงใน textbox id=lat_value
                    jQuery("#lon_value").val(my_Point.lng());  // เอาค่า longitude พิกัดผลลัพธ์ แสดงใน textbox id=lon_value 
                    jQuery("#zoom_value").val(map.getZoom()); // เอาขนาด zoom ของแผนที่แสดงใน textbox id=zoom_valu                                 
                }else{
                    // ค้นหาไม่พบแสดงข้อความแจ้ง
                    alert("Geocode was not successful for the following reason: " + status);
                  //  jQuery("#namePlace").val("");// กำหนดค่า textbox id=namePlace ให้ว่างสำหรับค้นหาใหม่
                 }
            });
        }        
    }
	
 

 
function call_gmap(){
    
    jQuery(function(){
    // ส่วนของฟังก์ชันค้นหาชื่อสถานที่ในแผนที่
    var searchPlace=function(){ // ฟังก์ชัน สำหรับคันหาสถานที่ ชื่อ searchPlace
        var AddressSearch=jQuery("#namePlace").val();// เอาค่าจาก textbox ที่กรอกมาไว้ในตัวแปร
        if(geocoder){ // ตรวจสอบว่าถ้ามี Geocoder Object 
            geocoder.geocode({
                 address: AddressSearch // ให้ส่งชื่อสถานที่ไปค้นหา
            },function(results, status){ // ส่งกลับการค้นหาเป็นผลลัพธ์ และสถานะ
                  if(status == GGM.GeocoderStatus.OK) { // ตรวจสอบสถานะ ถ้าหากเจอ
                    var my_Point=results[0].geometry.location; // เอาผลลัพธ์ของพิกัด มาเก็บไว้ที่ตัวแปร
                    map.setCenter(my_Point); // กำหนดจุดกลางของแผนที่ไปที่ พิกัดผลลัพธ์
                    my_Marker.setMap(map); // กำหนดตัว marker ให้ใช้กับแผนที่ชื่อ map                    
                    my_Marker.setPosition(my_Point); // กำหนดตำแหน่งของตัว marker เท่ากับ พิกัดผลลัพธ์
                    jQuery("#lat_value").val(my_Point.lat());  // เอาค่า latitude พิกัดผลลัพธ์ แสดงใน textbox id=lat_value
                    jQuery("#lon_value").val(my_Point.lng());  // เอาค่า longitude พิกัดผลลัพธ์ แสดงใน textbox id=lon_value 
                    jQuery("#zoom_value").val(map.getZoom()); // เอาขนาด zoom ของแผนที่แสดงใน textbox id=zoom_valu                                 
                }else{
                    // ค้นหาไม่พบแสดงข้อความแจ้ง
                    alert("Geocode was not successful for the following reason: " + status);
                    jQuery("#namePlace").val("");// กำหนดค่า textbox id=namePlace ให้ว่างสำหรับค้นหาใหม่
                 }
            });
        }        
    }
	


		
    jQuery("#SearchPlace").click(function(){ // เมื่อคลิกที่ปุ่ม id=SearchPlace ให้ทำงานฟังก์ฃันค้นหาสถานที่
        searchPlace();    // ฟังก์ฃันค้นหาสถานที่
    });
    jQuery("#namePlace").keyup(function(event){ // เมื่อพิมพ์คำค้นหาในกล่องค้นหา
        if(event.keyCode==13){    //     ตรวจสอบปุ่มถ้ากด ถ้าเป็นปุ่ม Enter ให้เรียกฟังก์ชันค้นหาสถานที่
            searchPlace();        // ฟังก์ฃันค้นหาสถานที่
        }        
    });

});
    
    jQuery(function(){

        // โหลด สคริป google map api เมื่อเว็บโหลดเรียบร้อยแล้ว

        // ค่าตัวแปร ที่ส่งไปในไฟล์ google map api

        // v=3.2&sensor=false&language=th&callback=initialize

        //    v เวอร์ชัน่ 3.2

        //    sensor กำหนดให้สามารถแสดงตำแหน่งทำเปิดแผนที่อยู่ได้ เหมาะสำหรับมือถือ ปกติใช้ false

        //    language ภาษา th ,en เป็นต้น

        //    callback ให้เรียกใช้ฟังก์ชันแสดง แผนที่ initialize    

        jQuery("<script/>", {

          "type": "text/javascript",

          src: "http://maps.google.com/maps/api/js?v=3.2&sensor=false&language=th&callback=initialize"

        }).appendTo("body");    

    });
    
}

//* Jirawat 7/7/2011 */ 
function show_my_module(src,module,pg,tab,todo,id,project){ 
	if(tab !=""){ showtab(tab); }
	new GAjax().send('/web/control/'+module+'/'+pg+'.php',
	"module="+module+
	"&id="+id+ 
	"&project="+project+ 
	"&todo="+todo,					 
	function(xhr){
	
		$E(src).innerHTML = xhr.responseText;
		xhr.responseText.evalScript();
	});
}

//var mySplitResult = val.split("#");
//	val = mySplitResult[2];
function call_provice(src,val1,val2){

var mySplitResult = val1.split("#");
val1 = mySplitResult[0];	 
	
         new GAjax().send('/web/include/call_province.php',
            "src="+src+
			"&val1="+val1+
            "&val2="+val2,                     
        function(xhr){     
                $E(src).innerHTML = xhr.responseText;
                xhr.responseText.evalScript();
            });
 
}

/* Jirawat 8/7/2011 เพื่อจัดการเมนู แบบ Auto Dynamic*/
function module_quick(src,module,pg,val_get){

         new GAjax().send('/web/control/'+module+'/'+pg+'.php',
            "src="+src+
			"&"+val_get
			,                
        function(xhr){     
                $E(src).innerHTML = xhr.responseText;
                xhr.responseText.evalScript();
            }); 
}

function checking(val,goto){
    
    if(goto=="ck"){
        document.getElementById(val).checked = true;
    }else{
        document.getElementById(val).checked = false;
    }
}
