
function getOffsetLeft (el) {
var ol = el.offsetLeft;
 while ((el = el.offsetParent) != null)
 ol += el.offsetLeft;
 return ol;
}
function getOffsetTop (el) {
 var ot = el.offsetTop;
 while((el = el.offsetParent) != null)
 ot += el.offsetTop;
 return ot;
}


function fire(url){
             // alert(url);
		iWidth = screen.availWidth;
			iHeight = screen.availHeight;

				// Place the window
				var NewWinPutX=0;
				var NewWinPutY=0;
				if(((iWidth!=800) && (iHeight!=566)) || ((iWidth!=800) && (iHeight!=572))){

				TheNewWin =window.open(url,'TheNewpop1','fullscreen=no, width=800, height=600,screenX=0, screenY=0, toolbar=no,location=no,directories=no,statusbar=no,menubar=no,scrollbars=no,resizable=no');
				}
				else{
				TheNewWin =window.open(url,'TheNewpop1','fullscreen=yes, screenX=0, screenY=0, toolbar=no,location=no,directories=no,statusbar=no,menubar=no,scrollbars=no,resizable=no');
				TheNewWin.resizeTo(800,600);
		}
	}




function fire_large(url){
             // alert(url);
		iWidth = screen.availWidth;
			iHeight = screen.availHeight;

				// Place the window
				var NewWinPutX=0;
				var NewWinPutY=0;
				if(((iWidth!=800) && (iHeight!=566)) || ((iWidth!=800) && (iHeight!=572))){

				TheNewWin =window.open(url,'TheNewpop1','fullscreen=no, width=1024, height=768,screenX=0, screenY=0, toolbar=no,location=no,directories=no,statusbar=no,menubar=no,scrollbars=no,resizable=no');
				}
				else{
				TheNewWin =window.open(url,'TheNewpop1','fullscreen=yes, screenX=0, screenY=0, toolbar=no,location=no,directories=no,statusbar=no,menubar=no,scrollbars=no,resizable=no');
				TheNewWin.resizeTo(1024,768);
		}
	}






     var htmlwin;
     var colhwin;
     var coldwin;
     function popup(win,name,prodid)
     {

      win=window.open('viewtable.php?item='+prodid,name,'resizable=1,scrollbars=1,menubar=1');
          win.creator=self;
          win.focus();
     }




function formSubmit(form_name)
{
document.getElementById(form_name).submit()
}



