// JavaScript Document

 
function showVideo() {
	//document.getElementById("videoWindow").innerHTML = 'video';
	var so = new SWFObject('/media/mediaplayer.swf','mpl','440','248','9');
	so.addParam('allowscriptaccess','always');
	so.addParam('allowfullscreen','true');
	so.addVariable('height','248');
	so.addVariable('width','440');
	so.addVariable('file','http://www.gonzalesvideo.com/media/MarioCustom.flv');
	so.addVariable('image','/images/vidpreview.jpg');
	so.addVariable('backcolor','0x201710');
	so.addVariable('frontcolor','0xddeac6');
	so.addVariable('lightcolor','0xffffff');
	so.addVariable('screencolor','0x000000');
	so.addVariable('displayheight','248');
	so.addVariable('searchbar','false');
	so.addVariable('autostart','true');
//	so.write('videoPlayer');
}

function hideVideo() {
	document.getElementById("player").innerHTML = '&nbsp;';
}


function removePreloader() { //DOM
	if (document.getElementById){
		document.getElementById('preloader').style.visibility='hidden';
	} else {
		if (document.layers){ //NS4
			document.preloader.visibility = 'hidden';
		} else { //IE4
			document.all.preloader.style.visibility = 'hidden';
		}
	}
}
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
	window.onload = func;
  }
  else {
	window.onload = function() {
	  if (oldonload) {
		oldonload();
	  }
	  func();
	}
  }
}




function moveElement(elementId, offset) {
	//var offset = 276; // set offset (likely equal to your css top), default is 0
	var element = document.getElementById(elementId);
	element.style.top = (document.documentElement.scrollTop + offset) + 'px';
}
