function closeLightbox()
{
	lightbox.prototype.deactivate();
}


function openmapview(lat, lon)
{
	lightbox.prototype.deactivate();

	document.location.href='default.asp?header=2&lat=' + lat + '&lon=' +lon 

	return false;
}

function cambiaClasse()
{

	if(document.getElementById)
	{
		var el=document.getElementById('myMap');
		var txt=document.getElementById('txt');

		el.className = (el.className=="myMap2") ? "myMap" : "myMap2";
		
	}
}

function SetLogoClassName() 
{
	logo = document.getElementById('logoimg');

	if (window.XMLHttpRequest)
		logo.className='myPushpin'; 
	else
		logo.className='myPushpinIE6'; 
}

function ShowHide(id)
{
	if(document.getElementById)
	{
		var el=document.getElementById(id);
		el.style.display = (el.style.display=="block") ? "none" : "block";
	}
}

function Hide(id)
{
	if(document.getElementById)
	{
		var el=document.getElementById(id);
		el.style.display="none";
	}
}

function popup(str,w,h) {

if (win) 

{
	tmp = win;
	win = null;
	if (navigator.appName != "Netscape")
		tmp.close();
}

win = window.open(str,"popup","scrollbars=1,resizable=1,width="+w+",height="+h+",status=0,location=0,toolbar=0,top=55,left=160");

}


function showerr(fld, msg) {
	document.getElementById(fld).innerHTML = '<br>' + msg;
}

function showerr2(fld, msg) {
	document.getElementById(fld).innerHTML = '' + msg;
}

function showerr3(fld, msg) {
	document.getElementById(fld).innerHTML = '<h6>' + msg + '</h6>';
}

function reseterrv()
{
	showerr2('lagree1','');
	showerr2('lemail','');
	showerr2('lemail2','');
	showerr2('lgender','');
	showerr2('lidbirthcountry','');
	showerr2('lbirthdate','');
	showerr2('lnickname','');
	showerr2('lpassword','');
	showerr2('lpassword2','');
	showerr2('lidjob','');
	showerr2('luniversity','');

}

function reseterrp()
{
	showerr2('laddress','');
	showerr2('lagree1','');
	showerr2('lagree2','');
	showerr2('lagree3','');
	showerr2('lbirthcity','');
	showerr2('lcity','');
	showerr2('lemail','');
	showerr2('lemail2','');
	showerr2('lfirstname','');
	showerr2('lgender','');
	showerr2('lidbirthcountry','');
	showerr2('lbirthdate','');
	showerr2('lidcountry','');
	showerr2('lidnationality','');
	showerr2('llastname','');
	showerr2('lnickname','');
	showerr2('lpassword','');
	showerr2('lpassword2','');
	showerr2('lpostalcode','');
	showerr2('lidjob','');
	showerr2('luniversity','');

}

function reseterru()
{
	showerr2('laddress','');
	showerr2('lagree1','');
	showerr2('lagree2','');
	showerr2('lagree3','');
	showerr2('lbirthcity','');
	showerr2('lcity','');
	showerr2('lemail','');
	showerr2('lfirstname','');
	showerr2('lbirthdate','');
	showerr2('lidcountry','');
	showerr2('lidnationality','');
	showerr2('llastname','');
	showerr2('lnickname','');
	showerr2('lpostalcode','');

}
function reseterrsf()
{
	showerr2('lfirstname','');
	showerr2('lemailto','');
	showerr2('lsubject','');
	showerr2('lname','');
	showerr2('lsender','');
}

function reseterrsp()
{
	showerr2('lfirstname','');
	showerr2('lemail','');
}

function reseterrsfoto()
{
	showerr2('lpicture','');
	showerr2('ltitle','');
	showerr2('lcomment','');
	showerr2('lsubject','');
	showerr2('lidcountry','');
	showerr2('lplace','');
	showerr2('lidsection','');
}

function dataValida(txt)
{
	var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/
	if(re.test(txt)){
		var adata = txt.split('/');
		var gg = parseInt(adata[0],10);
		var mm = parseInt(adata[1],10);
		var aaaa = parseInt(adata[2],10);
		var xdata = new Date(aaaa,mm-1,gg)
		if((xdata.getFullYear()==aaaa) && (xdata.getMonth()==mm-1) && (xdata.getDate()==gg))
			return true
		else return false
	}else return false
}

function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}

var win