﻿
//<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>__________________
function HighLight(id,status){
	if(status==1){
		document.getElementById(id).style.filter = "alpha(opacity=70, finishopacity=70, style=2, startx=0, starty=0, finishx=140, finishy=270);";
	} else {
		document.getElementById(id).style.filter = "";
	}	
}


//<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>__________________
function COLORATE(id,status){
	if(status==1){
		document.getElementById(id).style.filter = "";
	} else {
		document.getElementById(id).style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";	
	}	

}




//<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>__________________is_numeric
function is_numeric(FLD){
	
	var val = FLD;
	val++;val--;
	
	if(FLD==val)return true;

	return false;	
}

//<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>__________________addZiro
function addZiro(Q){if(Q<10)return '0'+Q;else return Q;}


//<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>__________________
function str_replace(find,replace,string){
	var fndLng=find.length;
	for(i=0; i<string.length; i++){
		if(string.substr(i,fndLng)==find){
			string=string.substring(0,i)+replace+string.substring(i+fndLng,string.length);
		}
	}
	return string;
}


// -------------------------------------
function wget(url, id, pars){
	document.getElementById(id).innerHTML='<center><img src="f___admin/img/loading.gif" ></center>';
	if(pars!=''){
		mtd = 'post';
	} else {
		mtd = 'get';
	}
	if(url.indexOf("?")==-1){
		;//
	} else {
		if(pars=='') {
			pars = url.substring(url.indexOf("?")+1,url.length);
		}
		url = url.substring(0,url.indexOf("?"));
	}
	var myAjax = new Ajax(url, {
		method: mtd
		,postBody: pars
		,update: $(id)
		,evalScripts: true
		,onFailure: null
		,onComplete: null
	}).request();

	return true;
}


