$(document).ready(function(){
	// Quicklinks - removes the submit button and makes a drop list
	quicklinkgo();

	/*var highestCol = Math.max(
		$('.index-intro').height(), 
		$('.index-image img').height(),
		$('.index-placeholder').height()
	);

	$('.banner-intro, .banner-placeholder').css({
	//$('.banner-intro').css({
		height: highestCol + 'px'
	});

	var highestCol = Math.max(
		$('.index_placeholders_toprow').height()
	);
	$('.index_placeholders_toprow').css({
		height : highestCol + 'px'
	});
	*/
});	



function quicklinkgo(){
	var btn = document.getElementById('quicklinks_go');
	if(!btn)
		return false;
	btn.style.display='none';//hide the button

	btn = document.getElementById('quicklinks_select');
	if(btn)btn.onchange=function(){this.parentNode.submit();}
}
function cleanOnFocus(field,defaultText){
	try{
		if(!field.tagName == "INPUT" || !field.type=="text" || !field.value)
			return false;
		if(field.value == defaultText)
			field.value='';
	}catch(e){
		return false;
	}
}
function resetOnLostFocus(field,defaultText){
	try{
		if(!field.tagName == "INPUT" || !field.type=="text")
			return false;
		if(!field.value)
			field.value=defaultText;
	}catch(e){
		return false;
	}
}

function swapPNGs(){
	try{
		var is = $('img');
		for(var i =0;i<is.length;i++)
			if(is[i].src.search(/.png/i) > 0)
				is[i].src =  is[i].src.replace(/.png/i,".gif");
	}catch(e){}
}

