/*
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.background;i++) x.background='<%=Application["imagePath"]%>menu1.gif';
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.background) x.background=x.background; x.background=a[i+2];}
}
*/

/*
// <ADDED> ZAM, 20040902-1605, Anket searchBox'inda entera basilinca arama yapacak
function submitenter(myfield,e)
{
	var keycode;
	if (window.event) keycode = window.event.keyCode;
	else if (e) keycode = e.which;
	else return true;

	if (keycode == 13)
	{
		document.form1.buttonSubmitter1.submit();
		return false;
	}
	else return true;
}
// </ADDED>
*/
function hideshowhediyebox()
{
	if(document.all.kabul.checked)
	{	
		document.all.t_notu.style.display = "block";		
	}
	else
	{
		document.all.t_notu.style.display = "none";		
	}
}
function sirketboxvisible()
{

if(!document.all.chb_sirketfaturasi.checked)
{
	document.all.Table6.style.display = "none";
}
else
{
	document.all.Table6.style.display = "block";
}
}

/*
function chkConsistsOfValidChars(element)
{
	elementTA = document.forms(0).elements[element];
	var strElementValue = elementTA.value;
	// strElementValue 
	var i;
	for (i=0; i < strElementValue.Length; i++) {
		if (strElementValue[i] == "&"){
			/*
			dim answer
			answer = MsgBox("Hello everyone!",65,"Example")
			document.write(answer)
			*
			alert('& isareti bulundu')
		}
	}
}
*/
function checkTextAreaLen(element, MaxLen) {
		elementTA = document.forms(0).elements[element];
		//elementCL = document.getElementById(element+ "CHARLEFT");//forms(0).elements[element + "CHARLEFT"];
	   var StrLen = elementTA.value.length, CharsLeft = 0;
		if (StrLen == 1 && elementTA.value.substring(0, 1) == " ") {
			elementTA.value = "";
			StrLen = 0;
		}
		if (StrLen > MaxLen ) {
			elementTA.value = elementTA.value.substring(0, MaxLen);
		}
		else {
			CharsLeft = StrLen;	
		}
		//elementCL.innerText = MaxLen - CharsLeft;
	}

// <ADDED> ZAM-20040215, Adres satiri için "/" isareti girilemesin
function checkAddressLen(element, MaxLen) {
		elementTA = document.forms(0).elements[element];
		//elementCL = document.getElementById(element+ "CHARLEFT");//forms(0).elements[element + "CHARLEFT"];
	   var StrLen = elementTA.value.length, CharsLeft = 0;
		if (StrLen == 1 && elementTA.value.substring(0, 1) == " ") {
			elementTA.value = "";
			StrLen = 0;
		}
		if (StrLen > MaxLen ) {
			elementTA.value = elementTA.value.substring(0, MaxLen);
		}
		else {
			CharsLeft = StrLen;	
		}
		//elementCL.innerText = MaxLen - CharsLeft;
	}


// <ADDED>	ZAM,	
//		CheckAddressChars(this) seklinde kullanilir, 
//	adreste "/" olup olmadigini kontrol eder
function CheckAddressChars(Target) 
{
	var Numbers = "/";
	strvalue = Target.value
	if (Numbers.indexOf(strvalue.substring(strvalue.length-1,strvalue.length)) != -1){
		strvalue = strvalue.substring(0, strvalue.length-1)
		document.Form1.txtEmail.value = strvalue
	}
}	
	
	
// <ADDED>  ZAM, 2004-08-26, Yeni menu yapisi icin gerekli header linki javascriptleri
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
// </ADDED>

 function popup(url,ww,wh,nm)
     {
        FWin = window.open(url,"YeniPencere","toolbar=0,top=20,left=20,width=" + ww + ",height=" + wh + ",location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,copyhistory=0");
        //FWin.title = nm;
        FWin.focus();
      }

 function popupAnketSonuc(url,ww,wh,nm)
     {
        FWin = window.open(url,"YeniPencere","toolbar=0,top=20,left=20,width=" + ww + ",height=" + wh + ",location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0");
        //FWin.title = nm;
        FWin.focus();
      }

 function popupYorum(url,ww,wh,nm)
     {
        FWin = window.open(url,"YeniPencere","toolbar=0,top=20,left=20,width=" + ww + ",height=" + wh + ",location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,copyhistory=0");
        //FWin.title = nm;
        FWin.focus();
      } 
 
 // kurumsal sitedeki sol bannerlarin linklerinin yeni pencerede açilmasini sagliyor
   function  OPenImpPhLinksinNewWindow()
	{
		if (document.getElementById("phcSolUstBanner_PresentationModeControlsContainer_PresentationHyperLink"))
		{
			document.getElementById("phcSolUstBanner_PresentationModeControlsContainer_PresentationHyperLink").setAttribute("target","_blank",0);
			document.getElementById("phcSolAltBanner_PresentationModeControlsContainer_PresentationHyperLink").setAttribute("target","_blank",0);
		}
	}
      
	/// Input alanina harf girilmesini engeller textbox'a alttaki event eklenmesi yeterli
/// onkeypress="self.event.returnValue=onlyNumeric(event);"
function onlyNumeric(element) {	
	//alert(window.event.srcElement.value);
	var whichCode = (window.Event) ? element.which : element.keyCode;
	//alert (element.keyCode);
	if (whichCode == 13) return true;  // Enter
	if (whichCode == 44) return true;  // Enter
	//BERKAYC: NOKTA DA GIRILEBILSIN, DECIMAL SAYILAR ICIN
	if (whichCode == 46) return true;

	if (whichCode > 57 ){return false;}
	if (whichCode < 48 && whichCode > 13){
	return false;}
}

	/// Input alanina harf girilmesini engeller textbox'a alttaki event eklenmesi yeterli
/// onkeypress="self.event.returnValue=chFilter(event);"
function chFilter(element) 
{	
	
	var whichCode = (window.Event) ? element.which : element.keyCode;
	//alert (element.keyCode);
	if (whichCode == 47) { return false; }  // /
	if (whichCode == 39) { return false; }  // '
	if (whichCode == 34) { return false; }  // "
	if (whichCode == 38) { return false; }  // &
	else {return true;}
	
}


/// [Bora]. Eklendi addressedit sayfasinda alanlari temizliyor.

function resetFields()
{
	 document.all.firstNameTextBox.value = "";
	 document.all.lastNameTextBox.value = "";
	 document.all.addressLine1TextBox.value = "";
	 document.all.addressLine2TextBox.value = "";
	 document.all.stateProvinceTextBox.value = "";
	 document.all.postalCodeTextBox.value = "";
}
function onlyCharacter(element)
{
	var whichCode = (window.Event) ? element.which : element.keyCode;
	if (whichCode == 13) return false;  // Enter
	if (whichCode == 44) return false;  // Enter
	if (whichCode == 60) return false;  // <
	if (whichCode == 62) return false;  // >
	if (whichCode == 58) return false;  // :
	if (whichCode == 59) return false;  // ;
	if (whichCode == 63) return false;  // ?
	if (whichCode == 92) return false;  // \
	if (whichCode == 91) return false;  // [
	if (whichCode == 93) return false;  // ]
	if (whichCode == 94) return false;  // ^
	if (whichCode == 233) return false;  // é
	if (whichCode == 124) return false;  // |
	if (whichCode == 96) return false;  // ``
	if (whichCode == 168) return false;  // |
	if (whichCode == 126) return false;  // |
	if (whichCode == 123) return false;  // }
	if (whichCode == 125) return false;  // {
	if (whichCode == 46) {return true};
	if (whichCode == 32) {return true};
	if (whichCode <= 57 ){return false;}

	if (whichCode > 57 ){return true;}
	if (whichCode < 48 && whichCode > 13){
	return true;}
}





