function emptyValidation(entered, alertbox){
	with (entered)
		{
			if (value==null || value==""){
				if (alertbox!="") {
					alert(alertbox);
				}
				return false;
			}
			else {
				return true;
			}
		}
	}
function emailValidation(entered, alertbox){
	with (entered){

      var testresults=false;
      var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
      if (!filter.test(value)){
        alert(alertbox);
        return false;
      }

			apos=value.indexOf("@");
			dotpos=value.lastIndexOf(".");
			lastpos=value.length-1;
			if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) {
				if (alertbox) {
					alert(alertbox);
			  }
				return false;
			}else if ( (value.indexOf("yahorerro.com.tr")>0) || (value.indexOf("hotmreeeail.com.tr")>0) || (value.indexOf("exciererrete.com.tr")>0) || (value.indexOf("lycrereros.com.tr")>0) || (value.indexOf("mairerrerlcity.com.tr")>0) ){
				alert("Yahoo, Hotmail gibi web tabanlı e-posta adresleri geçerli değildir!");
				return false;
			}
			else{
				return true;
			}
      
		}
	}

function MenuEkle(cURL) 
{var cBaslik = window.prompt('Özel menünüze eklemek istediginiz sayfa basligini degistirebilirsiniz.',window.document.title);
window.location.replace('menuekle.asp?URL='+cURL+'&Baslik='+cBaslik)
}
function MenuCikar(cURL) 
{
window.location.replace('menuekle.asp?Cikar=1&URL='+cURL);
}


function gG(obj) {
	if (document.getElementById(obj).style.display == 'block')

		document.getElementById(obj).style.display = 'none';
	else

		document.getElementById(obj).style.display = 'block';
		}


<!--

var layerH = 70;

var layerW = 130;

//sayfadaki yeri:
var llocation = "top_right"; 
/***************** 3 tarayıcı türü için ***************/
var layer;
var IE = document.all;
var updateWatch;
var start = 0;
var NS6 = false;

if(document.getElementById && navigator.appName == "Netscape")
  NS6 = true;

function scroller()
{
  var docH, docW, scrollT, scrollL;

 <!-- Scroller Code for IE -->  	   
  if(IE)
  {
    layer =  document.all.pane;
     
	if(layerH)
	{
	  layer.height = layerH;
      layer.style.height = layerH;
	}  
	else  
	  layerH = layer.height;

	if(layerW)
	{
	  layer.width = layerW;
	  layer.style.width = layerW;
	}
	else  
	  layerW = layer.width;
	
		
	docH = document.body.clientHeight;
	docW = document.body.clientWidth;
	
	scrollT = document.body.scrollTop;
	scrollL = document.body.scrollLeft;

    switch(llocation.toLowerCase())	
	{
	   case "top_left": 	layer.style.posTop =  scrollT;
                        	layer.style.posLeft = scrollL;
							break; 

	   case "top_right":   	layer.style.posTop =  (scrollT + 120 + (layerH/2));
                        	layer.style.posLeft = scrollL + (docW / 2 ) + 470 - layerW;
                            break;

   	   case "bottom_left":  layer.style.posTop =  scrollT + (docH - layerH);
                        	layer.style.posLeft = scrollL;
                            break;

   	   case "bottom_right": layer.style.posTop =  scrollT + (docH - layerH);
                        	layer.style.posLeft = scrollL + (docW - layerW);
                            break;
	  
	   default:             layer.style.posTop =  scrollT;
                        	layer.style.posLeft = scrollL;
	}
    layer.style.visibility = "visible";  
  }
  
  <!-- Scroller Code for NS6+ -->
  else if(NS6)
  {
    layer = document.getElementById("pane");
	if(layerH)
	{
	  layer.height = layerH;
      layer.style.height = layerH;
	}  
	else  
	  layerH = layer.height;

	if(layerW)
	{
	  layer.width = layerW;
	  layer.style.width = layerW;
	}
	else  
	  layerW = layer.width;
	
	docH = window.innerHeight;
	docW = window.innerWidth;
	
	scrollT = window.pageYOffset;
	scrollL = window.pageXOffset;
	
	switch(llocation.toLowerCase())	
	{
	   case "top_left": 	layer.style.top =  scrollT;
                        	layer.style.left = scrollL;
							break; 

	   case "top_right":   	layer.style.top =  (scrollT + 121 + (layerH/2));
                        	layer.style.left = scrollL + (docW / 2 ) + 462 - layerW;
                            break;

   	   case "bottom_left":  layer.style.top =  scrollT + (docH - layerH);
                        	layer.style.left = scrollL;
                            break;

   	   case "bottom_right": layer.style.top =  scrollT + (docH - layerH);
                        	layer.style.left = scrollL + (docW - layerW);
                            break;
	  
	   default:             layer.style.top =  scrollT;
                        	layer.style.left = scrollL;
	}
    layer.style.visibility = "visible";    
  }
  <!-- Scroller Code for NS4 -->
  else
  {
    layer = document.layers.pane;
	
    if(!layerH)
	  layerH = 70;

	if(!layerW)
	  layerW = 130;

	  
	layer.resizeTo(layerW,layerH);
	  

	docH = window.innerHeight;
	docW = window.innerWidth;
	
	scrollT = window.pageYOffset;
	scrollL = window.pageXOffset;
	
	switch(llocation.toLowerCase())	
	{
	   case "top_left": 	layer.moveTo(scrollL,scrollT);
							break; 

	   case "top_right":   	layer.moveTo(scrollL + (docW / 2 ) + 470 - layerW, scrollT + 128 + (layerH/2));
                        	break;

   	   case "bottom_left":  layer.moveTo(scrollL, scrollT + (docH - layerH) - 15);
                            break;

   	   case "bottom_right": layer.moveTo(scrollL + (docW - layerW) - 15,scrollT + (docH - layerH) - 15);
	                        break;
	  
	   default:             layer.moveTo(scrollL,scrollT);
	}
	
	//make layer visible   
    layer.visibility = "show";
  }
}
//-->

<!--
var TRange=null

function findString (str) {
 if (parseInt(navigator.appVersion)<4) return;
 var strFound;
 if (navigator.appName=="Netscape") {

  // NAVIGATOR-SPECIFIC CODE

  strFound=self.find(str);
  if (!strFound) {
   strFound=self.find(str,0,1)
   while (self.find(str,0,1)) continue
  }
 }
 if (navigator.appName.indexOf("Microsoft")!=-1) {

  // EXPLORER-SPECIFIC CODE

  if (TRange!=null) {
   TRange.collapse(false)
   strFound=TRange.findText(str)
   if (strFound) TRange.select()
  }
  if (TRange==null || strFound==0) {
   TRange=self.document.body.createTextRange()
   strFound=TRange.findText(str)
   if (strFound) TRange.select()
  }
 }
 if (!strFound) alert ("Bu sayfa içinde '"+str+"' bulunamadı!")
}
//-->



function SSSForm()
{
document.AraForm.action="sss.asp?Kaydet=1#tesekkur";
}


function SSS()
{ with (document.AraForm){
document.AraForm.action="sss.asp?Kaydet=1#tesekkur";
if(FaqTipID.value==0){
	alert("Lütfen sorunuzla ilgili bir kategori seçiniz!");
	FaqTipID.focus();
	return false;
	}

if(Baslik.value.length==0){
	alert("Lütfen bir soru yazınız!");
	Baslik.focus();
    return false;
	}
if(isim.value.length==0){
	alert("Lütfen isminizi giriniz!");
	isim.focus();
    return false;
	}
if(email.value.length==0){
	alert("Lütfen geçerli bir e-posta adresi giriniz!");
	email.focus();
    return false;
	}

if (email.value.length>0){
        if (!emailValidation(email, "Lütfen geçerli bir email adresi giriniz!")){
          email.focus();
          return false;
        }
    }
document.AraForm.submit();
}
}


function IletisimForm()
{
document.AraForm.action="iletisim.asp?Kaydet=1";
}


function Iletisim()
{ with (document.AraForm){
document.AraForm.action="iletisim.asp?Kaydet=1";
if(TipID.value==0){
	alert("Lütfen soru veya önerinize uygun bir kategori seçiniz!");
	TipID.focus();
	return false;
	}

if(Baslik.value.length==0){
	alert("Lütfen bir başlık giriniz!");
	Baslik.focus();
    return false;
	}
if(Soru.value.length==0){
	alert("Lütfen sorunuzu / önerinizi yazınız!");
	Soru.focus();
    return false;
	}

if(isim.value.length==0){
	alert("Lütfen isminizi giriniz!");
	isim.focus();
    return false;
	}
if(email.value.length==0){
	alert("Lütfen geçerli bir e-posta adresi giriniz!");
	email.focus();
    return false;
	}

if (email.value.length>0){
        if (!emailValidation(email, "Lütfen geçerli bir email adresi giriniz!")){
          email.focus();
          return false;
        }
    }
document.AraForm.submit();
}
}

function IletisimKontrol()
{with (document.AraForm){
	if (TipID.value==1)
	{
		document.getElementById('Icerik').style.display = 'block';
		document.getElementById('Teknik').style.display = 'none';
	}
	else if (TipID.value==2)
	{
		document.getElementById('Icerik').style.display = 'none';
		document.getElementById('Teknik').style.display = 'block';
	}
	else
	{
		document.getElementById('Icerik').style.display = 'none';
		document.getElementById('Teknik').style.display = 'none';
	}
}	
}

function DovizForm()
{
document.AraForm.action="doviz.asp";
}

function Doviz()
{
document.AraForm.action="doviz.asp";
document.AraForm.submit();
}

function UyeForm2()
{
document.AraForm.action="uyekayit1.asp?";
}
function AlisverisDevamForm()
{
document.AraForm.action="ucretliuyelik1.asp?";
}
function AlisverisDevam()
{
 with (document.AraForm){
 document.AraForm.action="ucretliuyelik1.asp.asp?";
if(! emptyValidation(UyeTel,"Lütfen bir telefon numarası giriniz!")){
        UyeTel.focus();
        return false;
      }
if(! emptyValidation(UyeAdres,"Lütfen faturanızın gönderileceği adresi giriniz!")){
        UyeAdres.focus();
        return false;
      }
if(UyeUlkeID.value==199 && UyeSehirID.value==0){
	alert("Lütfen Şehir bilgisini boş bırakmayınız!");
	return false;
	}
document.AraForm.submit();
}
}
function UlkeKontrol(obj)
{with (document.AraForm){
if (obj=="fatura")
{
	if (UyeUlkeID.value!=199)
	{
		document.getElementById(obj).style.display = 'block';
		UyeSehirID.disabled=true;
	}
	else
	{
		document.getElementById(obj).style.display = 'none';
		UyeSehirID.disabled=false;
	}
}	
}
}

function ToplamTurar()
{with (document.AraForm){
if (Sure.value > 0){
		TopTutar.value = Sure.value * 5 ;
	}
}
}
function check(e) {
	//alert("Kop!");		
   var iX = window.document.body.offsetWidth + e.clientX ;
   var iY = e.clientY ;
   if (iX <= 30 && iY < 0 )
   {
   sW = Math.round((screen.width/2)-125)
   sH = Math.round((screen.height/2)-37)
   window.open('logout.asp?',null,'width=250,height=74,status=no,toolbar=no,menubar=no,location=no,left='+sW+',top='+sH);
   }
   }
   
   
function UyeGiris()
{ with (document.AraForm){
document.AraForm.action="login.asp?";
if(Uye.value.length==0){
	alert("Lütfen geçerli bir e-posta adresi giriniz!");
	Uye.focus();
    return false;
	}

if (Uye.value.length>0){
        if (!emailValidation(Uye, "Lütfen geçerli bir e-posta adresi giriniz!")){
          Uye.focus();
          return false;
        }
      }document.AraForm.submit();
}
}
function UyeForm(nTip)
{
document.AraForm.action="login.asp?";
}

function UyeTekrarGiris()
{
document.AraForm.action="tekrarlogin.asp?";
document.AraForm.submit();
}
function UyeTekrarForm(nTip)
{
document.AraForm.action="tekrarlogin.asp?";
}


function SifreForm(nTip)
{
document.AraForm.action="uyesifre.asp?";
}
function SifreGiris()
{ with (document.AraForm){
document.AraForm.action="uyesifre.asp?";
if(email.value.length==0){
	alert("Lütfen geçerli bir email adresi giriniz!");
	email.focus();
    return false;
	}
if (email.value.length>0){
        if (!emailValidation(email, "Lütfen geçerli bir email adresi giriniz!")){
          email.focus();
          return false;
        }
      }document.AraForm.submit();
}
}

function CreateBookmarkLink() {
        title="Gümrük Mevzuatı"; 
        url="http://www.gumrukmevzuat.com";
        if (window.sidebar) { // Mozilla Firefox Bookmark
            window.sidebar.addPanel(title, url,"");
        } else if( window.external ) { // IE Favorite
            window.external.AddFavorite( url, title); }
        else if(window.opera && window.print) { // Opera Hotlist
            return true; }
     }

function AramaForm(nTip)
{
document.AraForm.action="sonuc.asp";
}
function AramaSozluk()
{ with (document.AraForm){
document.AraForm.action="sonuc.asp";
if(cSozluk.value.length==0){
	alert("Lütfen sözlükte arama yapmak için değer girin.");
	cSozluk.focus();
    return false;
	}
document.AraForm.submit();
}
}
function AramaSozcuk()
{ with (document.AraForm){
document.AraForm.action="sonuc.asp";
if(cSozcuk.value.length==0){
	alert("Lütfen tarifede arama yapmak için değer girin.");
	cSozcuk.focus();
    return false;
	}
document.AraForm.submit();
}
}
function AramaGtip()
{ with (document.AraForm){
document.AraForm.action="sonuc.asp";
if(cGTipNo.value.length==0){
	alert("Lütfen GTipNo arama yapmak için değer girin.");
	cGTipNo.focus();
    return false;
	}
document.AraForm.submit();
}
}
