function setVisibility(id, visibility) {
		document.getElementById(id).style.display = visibility;
	}
	
function getVideoCode(video)
{
	return '<object width="720" height="405"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id='+video+'&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00ADEF&fullscreen=1&autoplay=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id='+video+'&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00ADEF&fullscreen=1&autoplay=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="720" height="405"></embed></object>';
}

function validate(object, type)
{
document.getElementById(type+'error').innerHTML='Please wait...';
if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
else
	{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
xmlhttp.open("GET",'validations.php?t='+type+'&o=' + object,false);
xmlhttp.send(null);
if (xmlhttp.responseText == 'Success!')
	{
		document.getElementById('player').innerHTML=getVideoCode(video);
		document.getElementById(type+'error').innerHTML='Sit back and enjoy!';
	}
else
	{
		document.getElementById(type+'error').innerHTML=xmlhttp.responseText;
	}
}

var video='';
var facebooklink = encodeURIComponent('http://www.aiden316.com');
var facebookmessage = encodeURIComponent('Check out preview of Aiden latest CD/DVD!');
var fblinktotal = 'http://www.facebook.com/sharer.php?u=' + facebooklink + '&t=' + facebookmessage;