var nscp = (navigator.appName == "Netscape")
var ismc = (navigator.appVersion.indexOf("Mac") != -1)
var vers = parseFloat(navigator.appVersion.substring(22,25))

function getObj(obj)
{	if (nscp)
	{	resObj = document.layers[obj]}
	else
	{	resObj = eval("document.all." + obj + ".style")}
	return resObj
}

function mnuRoll(smenu,statu)
{	
	a = getObj("submenu" + smenu)
	if (statu) 
		{ a.visibility = "visible" 		}
	else
		{ a.visibility = "hidden" 		}
}

function WS(statustext) {window.status=statustext; return true;}
	
function frmEmail_onsubmit() {
	var email= document.frmEmail.txtemail.value   

	if (email.length>0) {
		if (email.indexOf("@")==-1 || email.indexOf(".")==-1 )  {
			alert("Lütfen geçerli bir Email adresi girin.");
			document.frmEmail.txtemail.focus();
			return (false);
		} else {return (true);}
	} 
	else {
		alert("Lütfen geçerli bir Email adresi girin.");
		return (false);
	}
}

function UpdQty(ID)   {document.frmViewCart.txtItemNo.value = ID}

function makeWin(url, p_Width, p_Height) {

    agent = navigator.userAgent;
    windowName = "Bilgi";

    params  = "";
    params += "toolbar=0,";
    params += "location=0,";
    params += "directories=0,";
    params += "status=0,";
    params += "menubar=0,";
    params += "scrollbars=1,";
    params += "resizable=1,";

    if (p_Width == "null") {
      params += "width=500,";
      params += "height=350";
    }
    else {
      params += "width=" +  p_Width  + ",";
      params += "height=" + p_Height + ",";
    }
 
    win = window.open(url, windowName , params);

    if (agent.indexOf("Mozilla/2") != -1 && agent.indexOf("Win") == -1) {
        win = window.open(url, windowName , params);
    }

    if (!win.opener) {
        win.opener = window;
    }
}


function ToggleDisplay(oButton, oItems)
{
	if ((oItems.style.display == "") || (oItems.style.display == "none"))	{
		oItems.style.display = "block";
		oButton.src = "images/bullets/minus.gif";
	}	else {
		oItems.style.display = "none";
		oButton.src = "images/bullets/plus.gif";
	}
	return false;
}

function OptChanged() {	document.frmAddCart.txtChanged.value = " (Özel)" }

function DelChanged() {	
	if (document.frmAddCart.IfDelCost.value != "on") {
		document.frmAddCart.IfDelCost.value = "on"
	}
	else {
		document.frmAddCart.IfDelCost.value = "off"
	}
}



