//change the opacity for different browsers 
function changeOpac(opacity, id)
{ 
    var object = document.getElementById(id).style; 
    object.opacity = (opacity / 100); 
    object.MozOpacity = (opacity / 100); 
    object.KhtmlOpacity = (opacity / 100); 
    object.filter = "alpha(opacity=" + opacity + ")"; 
}


function trim(str)
{
	s = str.replace(/^(\s)*/, '');
	s = s.replace(/(\s)*$/, '');
	return s;
}

function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}

function showSwfBanner()
{
	if(detectFlash())
	{
		document.getElementById('bannerJpgDiv').style.display = 'none';
		document.getElementById('bannerSwfDiv').style.display = '';
	}
}

function showJpgBanner()
{
	document.getElementById('bannerSwfDiv').style.display = 'none';
	document.getElementById('bannerJpgDiv').style.display = '';
}
