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; }


function writeYear() {
	RightNow = new Date();
	var TheYear = RightNow.getYear()
	
	if (TheYear >= 100 && TheYear <= 1999)
	{TheYear=TheYear + 1900}
	else
	{TheYear=TheYear}
	document.write(TheYear)
}

// clearText() thesecond parameter is allows this function to be used on password fields, the type of the password field should be set to "text"

function clearTextJ(wField,dValue) {
	if (dValue)	wField.defaultValue = dValue;	
	iValue = wField.defaultValue;
	cValue = wField.value;

	if (cValue == iValue) {
	    wField.value = "";	
		console.log("cleared");
		$j(wField).addClass("cleared");
	}		
}

function clearTextJBlur(wField,dValue) {
	console.log("blur");
	if (dValue)	wField.defaultValue = dValue;
	iValue = wField.defaultValue;
	cValue = wField.value;

	if (cValue == "") {	   
   		$j(wField).removeClass("cleared");					
		console.log("rem clear");		
		setTimeout(function() { if(!($j(wField)).hasClass("cleared") && wField.value == "") { wField.value = iValue;}},600)
	}
		
}



