// JavaScript Document
var screenW = screen.width;
var screenH = screen.height;

function OpenBrWindow(theURL,winName, myWidth, myHeight, isCenter) {
  var winW,winH,winL,winT;
  var features = ' ,';
  winW = myWidth;
  winH = myHeight;
  var rszed = false;
  if(myHeight>(screenH-25)) {
	  winH = screenH - 60;
	  winW = myWidth + 20;
	  var features = 'scrollbars=1 , resizable=1 , ';
	  rszed = true;
  }
  //if(myWidth>screenW) winW = screenW - 25;
  if(window.screen&&(isCenter||isCenter=="true")){
    winL = (screenW-winW)/2;
    winT = (screenH-winH)/2;
	if(rszed) winT = 5;
    features +='left='+winL+',top='+winT+' ,';
  }
  features = features + 'width='+winW+',height='+winH
  window.open(theURL,winName,features);
}

function cancelItem(val){
	if(confirm("The item will be removed from your order?"))
		location.href='RentedItems.php?cancel=true&id='+val;
}

