// JavaScript Document
if(typeof(console) != "object") {var console = new Object(); console.log = function() {} };
function params(qp) { try{r=unescape(location.search.match(new RegExp(qp+"=+([^&]*)"))[1]);}catch(e){r='';} return r; }	

var agt=navigator.userAgent.toLowerCase();
var msie = agt.toLowerCase().indexOf('msie') > 0;
var isSafari = ((agt.indexOf('safari')!=-1)&&(agt.indexOf('mac')!=-1))				

$D = function (str) { 
	if (isSafari) return;
	if (!msie) dump(str + '\n');
}

dumpObject = function (obj)
{
	if (isSafari) return;
	$D(sprintf('Dumping object (%s)------------------------------', typeof(obj) ));
	for (i in obj)
	{
			$D(sprintf("Property (%s) %s = %s", typeof(obj[i]), i, (typeof(obj[i]) == 'function' ? '{function}' : obj[i]) ));
	}
	$D('End Dump');
}

clear_debug = function()
{
	for (i = 0; i < 15; i++)
		$D('');
	$D('---------------------------------------------');
}

function writeYear() {
	RightNow = new Date();
	var TheYear = RightNow.getYear()
	
	if (TheYear >= 100 && TheYear <= 1999)
	{TheYear=TheYear + 1900}
	else
	{TheYear=TheYear}
	document.write(TheYear)
}


function confirmCancel(confirmWhat)	{
	return confirm("Are you sure you want to " + confirmWhat + "?");
}


function popUPcenter() {
			document.write("Open doc");
			putItCenter = window.open(url,target,'width=' + w + ',height=' + h + ',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,left=' + ((screen.availWidth - w - 10) * .5) + ',top=' + ((screen.availHeight - h - 30) * .5));
			putItCenter.focus();							
			}
