function toggleDiv(divName) {
    thisDiv = document.getElementById(divName);
    if (thisDiv) {
        if (thisDiv.style.display == "none") {
            thisDiv.style.display = "block";
        }
        else {
            thisDiv.style.display = "none";
        }
    }
    else {
        alert("Error: Could not locate div with id: " + divName);
    }
}

function mailLink(user, domain, subject) {

	var address = user + '@';

	window.location = "mailto:" + address + domain + "?subject=" + subject;
}

function wimpyPopPlayer(theFile,id) {
  window.open(theFile,id);
}

function popitup(url) {
	newwindow=window.open(url,'name','height=325,width=535,scrollbars=Yes,left=0,top=0');
	if (window.focus) {newwindow.focus()}
	return false;
}

var W3CDOM = (document.createElement && document.getElementsByTagName);

function openvid(){
	if (W3CDOM && document.getElementById('leftvids')){
		
		var x = document.getElementById('leftvids').getElementsByTagName('a');
		for (i=0;i < x.length;i++){
			x[i].onclick = function(){
				document.getElementById(this.id+'_holder').innerHTML = '<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/'+ this.id +'&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/'+ this.id +'&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>';
				return false;
			}
		}
	}
}
window.onload = openvid;