﻿function URLencode(sStr) {
	return escape(sStr).replace(/\+/g, '%2C').replace(/\"/g, '%22').replace(/\'/g, '%27');
}

function RedirectTo(url) {
  // Needed so that if called within a frame, the top window's location is changed
	var p = window;
	while (p.parent != null && p.parent != p)
		p = p.parent;
	p.location = url;
}

function Popup(file) {
	var win = window.open(file, "_blank", "titlebar=no, menubar=yes, scrollbars=yes, width=450, height=400, resizable=yes, dependent=yes");
	win.focus();
}
