<!--
function openWinPopUp(URL,w,h,t,l) {
	var day = new Date();
	var id = day.getTime();
	var wdh = ( w == null || w == "" || w == "undefined" ) ? 250 : w;
	var hgh = ( h == null || h == "" || h == "undefined") ? 160 : h;
	var tp = ( t == null || t == "" || t == "undefined") ? 200 : t;
	var lft = ( l == null || l == "" || l == "undefined") ? 100 : l;
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no, width=" + wdh + ", height=" + hgh + ", left =" + lft + ", top = " + tp + "');");
}

function openPFWinPopUp(URL,w,h,t,l) {

	var wdh = ( w == null || w == "" || w == "undefined" ) ? 250 : w;
	var hgh = ( h == null || h == "" || h == "undefined") ? 160 : h;
	var tp = ( t == null || t == "" || t == "undefined") ? 200 : t;
	var lft = ( l == null || l == "" || l == "undefined") ? 100 : l;
	prnfrdlyPopUpWin = window.open(URL, 'PRINTERFRIENDLY', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=" + wdh + ", height=" + hgh + ", left =" + lft + ", top = " + tp + "');
	return prnfrdlyPopUpWin;
}

function openSmallWinPopUp(URL,w,h,t,l) {
	var wdh = ( w == null || w == "" || w == "undefined" ) ? 250 : w;
	var hgh = ( h == null || h == "" || h == "undefined") ? 160 : h;
	var tp = ( t == null || t == "" || t == "undefined") ? 200 : t;
	var lft = ( l == null || l == "" || l == "undefined") ? 100 : l;
	eval("smallPopUpWin = window.open(URL, 'PRINTERFRIENDLY', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=" + wdh + ", height=" + hgh + ", left =" + lft + ", top = " + tp + "');");
}

function NewWinPopUp(URL) {
	eval("PopUpWin = window.open(URL, 'PRINTERFRIENDLY');");
}

function replace(string,text,by) {
// Replaces text with by in string
    var strLength = string.length, txtLength = text.length;
    if ((strLength == 0) || (txtLength == 0)) return string;

    var i = string.indexOf(text);
    if ((!i) && (text != string.substring(0,txtLength))) return string;
    if (i == -1) return string;

    var newstr = string.substring(0,i) + by;

    if (i+txtLength < strLength)
        newstr += replace(string.substring(i+txtLength,strLength),text,by);

    return newstr;
}

function openPopWindow(url, name) {
 popupWin = window.open(url, name, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=590,height=480,top=0,left=0')
}

//-->


