function CloseWindow() {
	if (self.parent.frames.length != 0) {
		self.parent.close()	
		} else {
		window.close()
		}
}
function PrintDocument(action){
	if (navigator.appName .indexOf("Microsoft") != -1 && navigator.platform.indexOf("Mac") != -1 || navigator.appVersion.indexOf("3.0") != -1) {
	alert("Please use your browser\'s print command to print this document.");
		} else {
		(action[0] != "") ? (parent.frames[action[1]].print()) : (parent.print());
		}
}

function ClickReturn () {
	var bAgent = window.navigator.userAgent; 
	var bAppName = window.navigator.appName;
	if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
		return true; /* dont follow link */
	else return false; /* dont follow link */
}

function SlideNewWindow(action) {
	if (action[0] == "") return;
	var wh = ""
	if (action[6] || action[7] || action[8] == true) wh=action[3]-125
	else wh = action[3]
	var wf = "";
	wf = wf + "width=" + action[2];
	wf = wf + ",height=" + wh;
	wf = wf + ",resizable=" + (action[4] ? "yes" : "no");
	wf = wf + ",scrollbars=" + (action[5] ? "yes" : "no");
	wf = wf + ",menubar=" + (action[6] ? "yes" : "no");
	wf = wf + ",toolbar=" + (action[7] ? "yes" : "no");
	wf = wf + ",directories=" + (action[8] ? "yes" : "no");
	wf = wf + ",location=" + (action[9] ? "yes" : "no");
	wf = wf + ",status=" + (action[10] ? "yes" : "no");
	// offset
	var wo = (action[11] ? action[11] : 0);
	var ho = (action[12] ? action[12] : 0);
	if(navigator.appVersion.charAt(0) >=4) {
	var sw=screen.width-20;
	var sh=screen.height;
	var newwidth=action[2]; 
	var newheight=action[3];
	var positionleft=(sw-newwidth)/2 + ho;
	var positiontop=""
	if (action[6] || action[7] || action[8] == true) positiontop=(sh-newheight)/3;
	else positiontop=(sh-newheight)/2.5 + wo;
	}
	newwindow=window.open(action[0],action[1],wf);
	newwindow.focus()	
	if(navigator.appVersion.charAt(0) >=4) {
		for(width1 = 1 ; width1 < positionleft ; width1 = width1 + 10)
		newwindow.moveTo(width1,positiontop)
		}
}
