var qty

// this function will open a new window
			function displayWindow(url,w,h){
				var win = null;
				LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
				TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
				settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+' ,resizable, scrollbars'
				win = window.open(url,'',settings)
				win.focus()
			}
			
			function displayWindowResisable(url, width, height) {
			
				var Win = window.open(url,'','width=' + width + ',height=' + height + ',resizable=1,scrollbars=1,menubar=1,status=0' );
				Win.focus()
			}
			function displayWindowAllOptions(url, width, height) {
			
				var Win = window.open(url,'');
				Win.focus()
			} 
// this function gets and ID, search for it in the document and returns  the object
			function getObj(id){
				var i;
				for (i =1 ; i <= document.forms[0].elements.length-1; i++)
				{
					if (document.forms[0].elements[i].id.indexOf(id)>=0)
						return document.forms[0].elements[i];
				}
			}
			 

	function ResizeObj(obj,width,height){
		// arrange the with(max: 80px) by keeping the proportionality
		
			if (obj.width>width){
			var oldWidth=obj.width;
			obj.width=width;
			//obj.height=(obj.width * obj.height/oldWidth);
		}
		// arrange the height of the image,	 can not be more than 108px
		if (obj.height>height){
			var oldHeight= obj.height;
			obj.height=height;
			//obj.width=(obj.height * obj.width/oldHeight);
		}
	}

/* to display the waiting div for the search use control*/	
function showWaitLayerHeader()
{
divWait.style.visibility = 'visible';
}			
function showWaitLayer2()
{
	divWait2.style.visibility = 'visible';
}	
function clickButton(e, buttonid){ 
      var bt = document.getElementById(buttonid); 
      if (typeof bt == 'object'){ 
            if(navigator.appName.indexOf("Netscape")>(-1)){ 
                  if (e.keyCode == 13){ 
                        bt.click(); 
                        return false; 
                  } 
            } 
            if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ 
                  if (event.keyCode == 13){ 
                        bt.click(); 
                        return false; 
                  } 
            } 
      } 
} 
