function openInfoWindow(theURL) {
// used to display details for a product on a subcategory page
  var x = 50, y = 50; // default values

  if (document.all) {
    x = window.screenLeft + 5;
    y = window.screenTop + 5;
  }
  else if (document.layers) {
    x = window.screenX + 5;
    y = window.screenY + 5;
}

var popup = window.open(theURL,'prodcutWindow','width=412,height=450,top='+y+',screenY='+y+',left='+x+',screenX='+x+',resizable=yes,scrollbars=yes');
popup.focus();
}

function openServiceWindow(theURL) {
  // used to display details for a service on a subcategory page
  var x = 50, y = 50; // default values

  if (document.all) {
    x = window.screenLeft + 180;
    y = window.screenTop + 5;
  }
  else if (document.layers) {
    x = window.screenX + 180;
    y = window.screenY + 5;
}

var popup = window.open(theURL,'serviceWindow','width=412,height=450,top='+y+',screenY='+y+',left='+x+',screenX='+x+',resizable=yes,scrollbars=yes');
popup.focus();
}

function openApplyWindow(theURL) {
  // used to display universal application form
  var x = 50, y = 50; // default values

  if (document.all) {
    x = window.screenLeft + 5 // + 422;
    y = window.screenTop //+ 5;
  }
  else if (document.layers) {
    x = window.screenX + 5//+ 422;
    y = window.screenY //+ 5;
}

var popup = window.open(theURL,'applyWindow','width=760,height=500,top='+20+',screenY='+y+',left='+x+',screenX='+x+',resizable=no,scrollbars=yes');
//popup.focus();
}

function openBranchWindow(file)
  // used to display the "My Branch" popup
{	
	var x = 50, y = 50; // default values

	if (document.all) 
	{
		x = window.screenLeft + 5;
		y = window.screenTop + 5;
	}
	else if (document.layers) 
	{
		x = window.screenX + 5;
		y = window.screenY + 5;
	}

	var popup = window.open(file,'branchWindow','width=500,height=400,top='+y+',screenY='+y+',left='+x+',screenX='+x+',resizable=yes,scrollbars=yes');
	popup.focus();
			
}

function openNewWindow(theURL) {
  // generic function to open any document in a new browser window

  window.open(theURL);
}

function openDetailWindow(theURL) {
  // used to display Job and Property detail pages; position irrelevant

  var popup = window.open(theURL,'detailWindow','width=412,height=450,resizable=yes,scrollbars=yes');
  popup.focus();
}

function openLeaving(theURL) {
// used to display details for a product on a subcategory page
  var x = 50, y = 50; // default values

  if (document.all) {
    x = window.screenLeft + 5;
    y = window.screenTop + 5;
  }
  else if (document.layers) {
    x = window.screenX + 5;
    y = window.screenY + 5;
}

var popup = window.open(theURL,'prodcutWindow','width=760,height=180,top='+y+',screenY='+y+',left='+x+',screenX='+x+',resizable=yes,scrollbars=yes');
popup.focus();
}