

function OpenPopup(url){

var pop;



	pop = window.open(url , 'PopUpWindow','width=385,height=228,left=200,top=250');



}

function OpenPopup(url,width,height){

var pop;



	pop = window.open(url , 'PopUpWindow','scrollbars=yes,width=' + width + ',height='+ height +',left=20,top=20');



}



function OpenPopup1(url,width,height,name){

var pop;



	pop = window.open(url , name,'scrollbars=yes,width=' + width + ',height='+ height +',left=20,top=20');



}

function OpenPopup2(url,width,height,name){

var pop;



	pop = window.open(url , name,'scrollbars=no,width=' + width + ',height='+ height +',left=20,top=20');



}



var popUp; 



function OpenCalendar(idname, postBack)

{

	//alert(idname);

//window.open('PopupCalendar.aspx.htm');	

	//popUp = window.open('Wc10d639a3c8f5.htm' + document.forms[0].name + 

	//	'&id=' + idname + '&selected=' + document.forms[0].elements[idname].value + '&postBack=' + postBack, 

	//	'popupcal', 

	//	'width=165,height=208,left=200,top=250');

popUp = window.open('Wc10d639a3c8f5.htm' + document.forms[0].name + '&id=' + idname + '&selected=none' + '&postBack=' + postBack,'popupcal','width=185,height=228,left=200,top=250');



}



function IsNumeric(sText)

{    

   var ValidChars = "0123456789.";

   var IsNumber=true;

   var Char;

 

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

      { 

        Char = sText.charAt(i); 

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

         {

           IsNumber = false;

         }

      }

      

     return IsNumber;            

   }





function SetDate(formName, id, newDate, postBack)

{

	

	//eval('var theform = document.' + formName + ';');

	

	eval('var theform = document.form1;');

	popUp.close();

	

	//alert(id);

	//theform.elements[id].value = newDate;

	theform.elements[id].value = newDate;

	//if (postBack)

	//	__doPostBack(id,'');

}

function check(){

if (navigator.userAgent.indexOf("Opera")!=-1

		 && document.getElementById) type="OP"; 

if (document.all) type="IE"; 

//For Netscape version 4 :

if (document.layers) type="NN"; 

//Mozila e.g. Netscape 6 upwards

if (!document.all && document.getElementById) type="MO"; 

return type;

}

function AddFavorites(){

	window.external.AddFavorite('default.htm','T.C. İstanbul Valiliği Resmi Web Sitesi');

}

function SetMyHome(){

	this.style.behavior='url(#default#homepage)';

	this.setHomePage('default.htm');

}

//sample check()

//type=check();

//if (type=="IE")