		leftstart=350;
		imgStatus="<img src='<?=base_url();?>img/fxg/load.gif'>";
		
		loadingStatus=function(div){
			$("#"+div).empty().html(imgStatus);
		}
		showpage=function(div,uri){
			$.ajax({
				type: "post", url: uri,
				dataType: "html",
				beforeSend: loadingStatus(div),
				success: function(html){ //so, if data is retrieved, store it in html 
					$("#"+div).empty().html(html); 
				}
			})
		}
		ajaxpage=function(div,uri){
			$.ajax({
				type: "post", url: uri,
				dataType: "html",
				data: "klik=reload",
				beforeSend: loadingStatus(div),
				success: function(html){ //so, if data is retrieved, store it in html 
					$("#"+div).empty().html(html); 
				}
			})
		}
		waitpage=function(div,uri,datafields){
			$.ajax({
				type: "post", url: uri,
				dataType: "html",
				data: datafields+"&klik=reload",
				async:false,
				beforeSend: loadingStatus(div),
				success: function(html){ //so, if data is retrieved, store it in html
					$("#"+div).empty().html(html);
				}
			})
		}
		loadpage=function(div,uri,datafields){
			$.ajax({
				type: "post", url: uri,
				dataType: "html",
				data: datafields+"&klik=reload",
				async:false,
				beforeSend: loadingStatus(div),
				success: function(html){ //so, if data is retrieved, store it in html
					$("#"+div).empty().html(html);
				}
			})
		}
		savedata=function(div,uri,datafields){
			var retval=$.ajax({
				type: "post", url: uri,
				dataType: "html",
				data: datafields+"&klik=reload",
				async:false,
				beforeSend: loadingStatus(div)
			}).responseText;
			$("#"+div).empty().html(retval); 
			return retval;
		}
		hidebutton=function(abtn){
			for(i=0;i<abtn.length;i++){
				$("#"+abtn[i]).hide();
			}
		}
	getformvalue=function(div,uri,datafields){
            if (typeof(datafields)=="undefined") datafields="";
			$.ajax({
				type: "post", url: uri,
				dataType: "html",
                data: datafields,
				success: function(html){ //so, if data is retrieved, store it in html
					$("#"+div).val(trim(html));
				}
			})
		}
	waitformvalue=function(div,uri,datafields){
            if (typeof(datafields)=="undefined") datafields="";
			$.ajax({
				type: "post", url: uri,
				dataType: "html",
				async:false,
                data: datafields,
				success: function(html){ //so, if data is retrieved, store it in html
					$("#"+div).val(trim(html));
				}
			})
		}
        function trim(stringToTrim) {
            return stringToTrim.replace(/^\s+|\s+$/g,"");
        }
        function ltrim(stringToTrim) {
            return stringToTrim.replace(/^\s+/,"");
        }
        function rtrim(stringToTrim) {
            return stringToTrim.replace(/\s+$/,"");
        }


