// JScript File
function openAddProperyWindow(url, height, width)
{
    window.open(url,'productAttributeValue','height=' + height + ',width=' + width + ',statusbar=0,resizable=no,toolbar=no,menubar=no,scrollbars=yes');
    alert(2)
    return false;
}

function jumpToURL(ddlURL)
{
    window.location.href=ddlURL.options[ddlURL.selectedIndex].value;
}

function setStatusBarText(txtStatus){
	window.status=txtStatus;return true}

function checkEnterForFormSubmit(e, o){ //e is event object passed from function invocation
var characterCode                       //literal character code will be stored in this variable

if(e && e.which){ //if which property of event object is supported (NN4)
e = e
characterCode = e.which //character code is contained in NN4's which property
}
else{
e = event
characterCode = e.keyCode //character code is contained in IE's keyCode property
}

if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
o.form.submit() //submit the form
return false 
}
else{
return true 
}
}

function handleEnterForSearch(button, event, buttonID){
  var keyCode = event.keyCode
		if (keyCode == 13) 
		  {
		    var button = document.getElementById(buttonID);
		    event.cancelBubble = true; 
		    event.returnValue = false;
		    event.cancel = false;
		    button.click();
  }
}

function clearMe(defaultVal, txtBox)
{
   if (txtBox.value==defaultVal){
    txtBox.value='';
   }
}

/* OPEN IMAGES IN NEW WINDOW (auto size) */
// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.
PositionX = 100;
PositionY = 100;

defaultWidth  = 900;
defaultHeight = 700;

var AutoClose = true;

if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["Slika"].width;');writeln('window.innerHeight=document.images["Slika"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=ffffff scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()" onclick="self.close()" style="cursor: hand;">');
writeln('<img name="Slika" src='+imageURL+' style="display:block"></body></html>');
close();		
}}
