/* GS/20070412 */

var theWindow = null;

function showPopup(theURL, theHeight, theWidth) {
  var leftPosition = (screen.width) ? (screen.width - theWidth)/2 : 0;
  var topPosition = (screen.height) ? (screen.height - theHeight)/2 : 0;
  var settings = 'height='+theHeight+',width='+theWidth+',top='+topPosition+',left='+leftPosition+',scrollbars=yes'+',resizable';
  
  theWindow = window.open(theURL, 'wndPopup', settings);
}

function doQuickAccess(theDropdown) {
  var theURL = theDropdown.options[theDropdown.selectedIndex].value;
  if (theURL) {
    location.href = theURL;
  }
}

function selectNode (node) {
   var selection, range, doc, win;
   if ((doc = node.ownerDocument) && (win = doc.defaultView) && typeof win.getSelection != 'undefined' && typeof doc.createRange != 'undefined' && (selection = window.getSelection()) && typeof selection.removeAllRanges != 'undefined') {
     range = doc.createRange();
     range.selectNode(node);
     selection.removeAllRanges();
     selection.addRange(range);
   }
   else if (document.body && typeof document.body.createTextRange != 'undefined' && (range = document.body.createTextRange())) {
     range.moveToElementText(node);
     range.select();
   }
}

function CheckIsIE() {
	if (navigator.appName.toUpperCase() == 'MICROSOFT INTERNET EXPLORER') { return true;}
	else { return false; }
}


function PrintIFrame() {

	if (CheckIsIE() == true) {
		document.theIFrame.focus();
		document.theIFrame.print();
	} else {
		window.frames['theIFrame'].focus();
		window.frames['theIFrame'].print();
	}
}


