function swap(no, islem){
	if (islem==1){
		eval('document.all.link'+no).src='images/link'+no+'On.gif';
	}
	else{
		eval('document.all.link'+no).src='images/link'+no+'.gif';
	}
}


function swapX(no, islem){
	if (islem==1){
		eval('document.all.altButon'+no).src='images/altButon'+no+'On.gif';
		
	}
	else{
		eval('document.all.altButon'+no).src='images/altButon'+no+'.gif';
	}
}


function switchImg (imgName, imgSrc) {

  if (document.images)
  {
    if (imgSrc != "none")
    {
      document.images[imgName].src ="images/" + imgSrc;
    }
  }
}



function pencere(no, islem){
	var deger;
	if (islem==0){
		deger='hidden';
	}
	else{
		deger='visible';
	}	
	eval('document.all.pencere'+no).style.visibility=deger
}

function hucre(nesne, islem){
	if (islem==1){
		nesne.className='menuHucreOn';
	}
	else{	
		nesne.className='menuHucreOff';
	}
} 


function linkClick(link){
	location=link;
}


function satir(nesne,islem){
if (islem==1){
		nesne.className='menuHucreOn';
	}
	else{	
		nesne.className='menuHucreOff';
	}
} 


function altMenu(nesne,islem){
if (islem==1){
		nesne.className='altMenuOn';
	}
	else{	
		nesne.className='altMenu';
	}
} 



function sinifDegistir(obje, sinif){
	obje.className=sinif;
}



function resimGoster(id){
	window.open("resimgoster.asp?id="+id, "", "toolbar=0,location=0,directories=0,status=0,menubar=no,scrollbars=no,resizable=no,width=420,height=500");
	}

	
	
function layerAc(nesne){
	layerKapat();
	eval("document.all."+nesne).style.visibility='visible';
}


function layerKapat(){
	document.all.order.style.visibility='hidden';
	document.all.suggest.style.visibility='hidden';
	document.all.comment.style.visibility='hidden';
	document.all.sonuc.style.visibility='hidden';
	
}


function stokKontrol(stokAdet){
	if(document.all.adet.value>stokAdet){
		alert("Order may not exceed the stock amount. Current amount is "+stokAdet+" pieces.");
		}
	else if	(document.all.adet.value<1){
		alert("Order amount may not be less than 1");
	}
	else{
		document.forms("orderForm").submit();
	}
}		

function urunSil(urunNo){
	eval("document.all." + urunNo).value=0;
	document.forms("orderForm").submit();
}

function fillBillingForm(){
	document.all.vergiadi.value=document.all.adSoyad.value;
	document.all.vergiadres.value=document.all.adres.value;
	document.all.vergizip.value=document.all.zipcode.value;
	document.all.vergiil.value=document.all.il.value;
	document.all.vergistate.value=document.all.state.value;
	document.all.vergiulke.selectedIndex=document.all.ulke.selectedIndex;
}
	
function openComment(yorumNo){
	window.open("yorumgoster.asp?id="+yorumNo, "", "toolbar=0,location=0,directories=0,status=0,menubar=no,scrollbars=yes,resizable=no,width=420,height=300");
	}
