function RakkamKontrol2(e, X){
	var Y = e.charCode == undefined ? e.keyCode : e.charCode;
	if ( (/^[0-9]+$/.test(String.fromCharCode(Y))) || Y==0 || Y==13 || Basilan(Y,X) ){ return true;}
	else { return false;} }
///////////////////////////////////////////////////////////////////////////////// 
function Basilan(Y,X){
	if (X != null) {
		for (var i = 0; i < X.length; i++) {
		if (X[i]  == String.fromCharCode(Y))			 
		return true;
		} }
	return false; }
///////////////////////////////////////////////////////////////////////////////// 

function RakkamKontrol(Z,Y,X){
	var nesne = Z.target ? Z.target : Z.srcElement;
	var val = nesne.value;
	val = val.replace(/^\s+|\s+$/g, "");
	if(Y)val = val.replace(/\s{2,}/g, " ");
	if(val>0) { $('#'+X).hide(); }
	nesne.value = val;
}
///////////////////////////////////////////////////////////////////////////////// 
var digits = "0123456789";
var Ex = "()- ";
var iz = Ex + "+";
var Dg = 10;
function Sg(s)      {   
    var i;
    for (i = 0; i < s.length; i++)  {   
    var c = s.charAt(i);
    if (((c < "0") || (c > "9"))) return false;  }
    return true;    }
function Bos(s)     {
	var i;
    var Rt = "";
    for (i = 0; i < s.length; i++)  {   
    var c = s.charAt(i);
    if (c != " ") Rt += c;  }
    return Rt; }
function Bug(s, bag) {   var i;
    var Rt = "";
    for (i = 0; i < s.length; i++)  {   
    var c = s.charAt(i);
    if (bag.indexOf(c) == -1) Rt += c; }
    return Rt; }
function Tel(T){
     var ara=3
     T=Bos(T)
     if(T.indexOf("+")>1) return false
     if(T.indexOf("-")!=-1)ara=ara+1
     if(T.indexOf("(")!=-1 && T.indexOf("(")>ara)return false
     var Ar=T.indexOf("(")
     if(T.indexOf("(")!=-1 && T.charAt(Ar+2)!=")")return false
     if(T.indexOf("(")==-1 && T.indexOf(")")!=-1)return false
     s=Bug(T,iz);
     return (Sg(s) && s.length >= Dg); }
///////////////////////////////////////////////////////////////////////////////// 

///////////////////////////////////////////////////////////////////////////////// 
function Revtrol() { Git(); document.getElementById('Mbox').submit(); }
///////////////////////////////////////////////////////////////////////////////// 
function RGL(X)     { 
         var N = document.getElementById('N').value;
         var F = document.getElementById('K'+X);
         document.getElementById('K'+N).style.display="none";
		 Effect.BlindDown(F,{ duration: 1.0 });
         document.getElementById('N').value=X; }
///////////////////////////////////////////////////////////////////////////////// 	
function Kapat()    {  document.getElementById('uyar').style.display="none";  }
function Ac()       {  document.getElementById('uyar').style.display="block"; }
function Kap()      {  document.getElementById('Gitti').style.display="none"; }
///////////////////////////////////////////////////////////////
function SayfaDuzeniBul() {
	var xScroll, yScroll;
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = window.innerWidth + window.scrollMaxX;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	var windowWidth, windowHeight;
	if (self.innerHeight) {	
		if(document.documentElement.clientWidth){
			windowWidth = document.documentElement.clientWidth; 
		} else {
			windowWidth = self.innerWidth;
		}
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { 
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}
	if(xScroll < windowWidth){	
		pageWidth = xScroll;		
	} else {
		pageWidth = windowWidth;
	}
	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
	return arrayPageSize;
}
///////////////////////////////////////////////////////////////
function KararAc() {
var EnBoy = SayfaDuzeniBul();
$('#JKarar').css({width:EnBoy[2],height:EnBoy[1]});
$('#JKarar').show(); Karar('JKarar',60);  }
///////////////////////////////////////////////////////////////
function KararKapa() { $('#JKarar').hide(); }

