// this Text obeject info is on http://webdeveloper.earthweb.com/webjs/jstext/article.php/640821   and   http://www.angelfire.com/yt/jmyers/bin/pod/Text.shtml
var Text = {
as:function(a1) { return '' + (a1 || '') },
is:function(a1) { return '' + a1 === a1 },
no:function(a1) {
	a1 = isNaN(a1=Number(a1)) ? parseFloat(a1) : a1;
	return isNaN(a1) ? 0 : a1;
},
ex:function(a1,a2) {
	var mo = Math.floor(a2/2);
	if (mo > 1) return this.ex(a1 + a1, mo) + (a2 % 2 && a1 || '');
	var fo = '';
	while (a2 > 0) { fo += a1; a2-- }
	return fo;
},
pad:function(a1,a2,a3) {
return this.is(a1)
	? a1 + this.ex(a3 || ' ', a2 - a1.length)
	: this.ex(a3 || ' ', a1 - ('' + a2).length) + a2;
},
trim:function(a1,a2,a3) {
	a1 = this.as(a1).replace(a3 || /^\s+|\s+$/g, '');
	return a2 && a1.length > a2 ? a1.substr(0,a2-1) + '\u2026' : a1; 
},
line:function(a1) {
	var OS = navigator.platform, NL = OS.indexOf('Mac') != -1
		&& '\r' || OS.indexOf('Win') != -1
		&& '\r\n' || '\n';
	return this.as(a1) + NL;
},
code:function(a1) { return (a1=this.as(a1)) ? "unescape('"+escape(a1)+"')" : "''" }
}


function openLoudWin(url, w, h) {
	var loudWin;
	loudWin = window.open(url, "loudWinPopUp", "width=" + w + " ,height=" + h + " ,status=no, resizable=yes");
	//loudWin = window.open(url, "loudWinPopUp", "status=no, resizable=yes");
	loudWin.focus();
	//loudWin.resizeTo(w, h);
}

function openLoudCollegeWebWin(url) {
	var loudCollegeWin;
	loudCollegeWin = window.open(url, "loudCollegeWebWin");
}


function closeLoudWin() {
	window.close();
}

function openerGo(url) {
	opener.location = url;
}


function encodeText(encodedText) {
	// this is to decode text that has been "scrambled" with extra chars to avoid spiders and spam
	////sample encoded txt: <script language="javascript">document.write(encodeText("H^E^L^L^O"));</script>
	decodedText = encodedText.replace(/\^/g, ""); // the extra char is ^. So the encoded text is t^e^x^t
	return decodedText;
}


function loudTest() {
	alert("success");
}

function _layer_on_off(id) {
	i=document.getElementById(id);
	i.style.display=(i.style.display == 'none' ? 'block' : 'none');
}