
var agt=navigator.userAgent.toLowerCase();
var isOp = agt.indexOf("opera") != -1;
var isMSIE=(navigator.appName == "Microsoft Internet Explorer") && ! isOp;
var PopupWindowName="";   // needs to be global

function openPopupWindow(url, w, h) {
  if (PopupWindowName=="" || PopupWindowName==null || PopupWindowName.closed) {
    PopupWindowName = window.open(url,'pw_xtraining','width='+w+',height='+h+',location=no,menubar=no,resizable,scrollbars,status=no,toolbar=no');
    PopupWindowName.focus();
  } else if (!PopupWindowName.closed) {
    PopupWindowName.location.href = url;
    PopupWindowName.focus();
  }
}

function popup(url, width, height) {
    if (navigator.appName == "Netscape")
        props = 'directories=no,hotkeys=no,location=no,menubar=no,personalbar=no,resizable=no,status=no,scrollbars=yes';
    else
        props = 'directories=no,location=no,menubar=no,toolbar=no,resizable=no,status=no,scrollbars=yes';
    props = props + ',height=' + height + ',width=' + width;
    window.open( url, '_blank', props );
}

function jumpTo( ) {
name ="PIQLPARENT";
    if (navigator.appName == "Netscape")
        bakwin = window.open( '../weblook/' + backToHome, 'bakHome', 'directories=no,hotkeys=no, location=no,menubar=no,personalbar=no,resizable=yes,scrollbars=yes,status=no,height=' + backToHomeHeight + ',width=' + backToHomeWidth );
    else
        bakwin = window.open( '../weblook/' + backToHome, 'bakHome', 'directories=no, location=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes,status=no,height=' + backToHomeHeight + ',width='+backToHomeWidth );
}

function signin_getCookieVal(offset) {
	endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function signin_getCookie(name) {
	var arg = name + "=";
	//var arg = name;
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
			return signin_getCookieVal(j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) 
			break;
	}
	return "";
}

function signin_badOrOld() {
	return (signin_getCookie("IBM_PW") == "");
}

function deleteTable(tableName)
{
  T=document.getElementById(tableName)
  while(T.rows[0]) {
    T.deleteRow(0)
  }
}

