
function portiPopup(url, name, w, h, mode) {  // no status bar, scroll bars, resizable
	var w = w - 0;
	var h = h - 0;

	if (mode == "fullscreen") {
		var winW = 0;
		var winH = 0;
		w = screen.width;
		h = screen.height;
	}
	else if (mode == "fullheight") {
		var winH = 0;
		h = screen.height;
		var winW = (screen.width - w);
	}	
	else if (mode == "2ndpop") {
		var winH = 0;
		h = screen.height;
		var winW = 0;
	}
	else if (mode == "contact") {
		var winH = 0;
		h = screen.height;
		var winW = (screen.width - w)/2;
		w += 30;
	}
	else {
		var winW = (screen.width - w) / 2;
		var winH = (screen.height - h) / 2;
		w += 30;
		h += 30;
	}
	var win2 = window.open(url,name,'width='+w+',height='+h+',top='+winH+',left='+winW+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
	win2.focus();
}

//--- show/hide ----------------------------------

function showhide(div) {
	var styleObj = document.getElementById(div);
	if (styleObj.style.visibility == "visible")
		styleObj.style.visibility = "hidden";
	else styleObj.style.visibility = "visible";
}

function hide(div) {
	var styleObj = document.getElementById(div);
	styleObj.style.visibility = "hidden";
}

//-----------------------------------------------
_editor_url = "htmlarea/";                     // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 9) {
  document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
  document.write(' language="Javascript1.2"></scr' + 'ipt>');  
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
