var vid;
var vid2;
var vid3;
var vid4;
var vid5;
var vid6;

//adds and event listener across major browser versions
function addEvent( obj, type, fn )
{
   if ( obj.addEventListener )
   {
      obj.addEventListener( type, fn, true );
   }
   else if ( obj.attachEvent )
   {
      obj.attachEvent( "on" + type, fn );
   }
   else
   {
      obj["on" + type] = fn;
   }
}

//removes event listeners across major browser versions
function removeEvent( obj, type, fn )
{
   if ( obj.removeEventListener )
   {
      obj.removeEventListener( type, fn, true );	
   }
   else if ( obj.detachEvent )
   {
      obj.detachEvent( "on" + type, fn );
   }
   else
   {
      delete obj["on" + type];	
   }
}
   
function divClickHandler()
{
   var id = "video1";
	var so = new SWFObject( "http://media.referralcamp.com.s3.amazonaws.com/websitetrafficintro.swf", "csSWF", "640", "498", "9.0.28", "#1a1a1a");
	so.addParam( "quality", "best" );
	so.addParam( "allowFullScreen", "true" );
	so.addParam( "scale", "showall" );
	so.addParam( "allowScriptAccess", "always" );
	so.addVariable( "autostart", "true" );
	if( !so.write( "video1" ) )	
	{
	   var node = '<div id="cs_noexpressUpdate">'
		            + '<p align="center">The Referral Camp video content presented here </p><p align="center"> requires JavaScript to be enabled and the latest version </p><p align="center">of the Adobe Flash Player.  If you are you using </p><p align="center">a browser with JavaScript disabled please enable it now.</p><p align="center"> Otherwise, please update your version of the </p><p align="center">free Flash Player by <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">downloading here</a>. </p>'
               + '</div>'
      var n = (typeof id == 'string') ? document.getElementById( id ) : id;
      n.innerHTML = node;
	}

   removeEvent( vid, 'click', divClickHandler );
} 

function divClickHandler2()
{
   var id = "video2";
	var so = new SWFObject( "http://media.referralcamp.com.s3.amazonaws.com/freeproductcreation.swf", "csSWF", "640", "498", "9.0.28", "#1a1a1a");
	so.addParam( "quality", "best" );
	so.addParam( "allowFullScreen", "true" );
	so.addParam( "scale", "showall" );
	so.addParam( "allowScriptAccess", "always" );
	so.addVariable( "autostart", "true" );
	if( !so.write( "video2" ) )	
	{
	   var node = '<div id="cs_noexpressUpdate">'
		            + '<p align="center">The Referral Camp video content presented here </p><p align="center"> requires JavaScript to be enabled and the latest version </p><p align="center">of the Adobe Flash Player.  If you are you using </p><p align="center">a browser with JavaScript disabled please enable it now.</p><p align="center"> Otherwise, please update your version of the </p><p align="center">free Flash Player by <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">downloading here</a>. </p>'
               + '</div>'
      var n = (typeof id == 'string') ? document.getElementById( id ) : id;
      n.innerHTML = node;
	}

   removeEvent( vid2, 'click', divClickHandler2 );
} 

function divClickHandler3()
{
   var id = "video3";
	var so = new SWFObject( "http://media.referralcamp.com.s3.amazonaws.com/KevinMurphyComments.swf", "csSWF", "312", "258", "9.0.28", "#1a1a1a");
	so.addParam( "quality", "best" );
	so.addParam( "allowFullScreen", "true" );
	so.addParam( "scale", "showall" );
	so.addParam( "allowScriptAccess", "always" );
	so.addVariable( "autostart", "true" );
	if( !so.write( "video3" ) )	
	{
	   var node = '<div id="cs_noexpressUpdate">'
		            + '<p align="center">The Referral Camp video content presented here </p><p align="center"> requires JavaScript to be enabled and the latest version </p><p align="center">of the Adobe Flash Player.  If you are you using </p><p align="center">a browser with JavaScript disabled please enable it now.</p><p align="center"> Otherwise, please update your version of the </p><p align="center">free Flash Player by <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">downloading here</a>. </p>'
               + '</div>'
      var n = (typeof id == 'string') ? document.getElementById( id ) : id;
      n.innerHTML = node;
	}

   removeEvent( vid3, 'click', divClickHandler3 );
} 

function divClickHandler4()
{
   var id = "video4";
	var so = new SWFObject( "http://media.referralcamp.com.s3.amazonaws.com/jamesderr.swf", "csSWF", "230", "258", "9.0.28", "#1a1a1a");
	so.addParam( "quality", "best" );
	so.addParam( "allowFullScreen", "true" );
	so.addParam( "scale", "showall" );
	so.addParam( "allowScriptAccess", "always" );
	so.addVariable( "autostart", "true" );
	if( !so.write( "video4" ) )	
	{
	   var node = '<div id="cs_noexpressUpdate">'
		            + '<p align="center">The Referral Camp video content presented here </p><p align="center"> requires JavaScript to be enabled and the latest version </p><p align="center">of the Adobe Flash Player.  If you are you using </p><p align="center">a browser with JavaScript disabled please enable it now.</p><p align="center"> Otherwise, please update your version of the </p><p align="center">free Flash Player by <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">downloading here</a>. </p>'
               + '</div>'
      var n = (typeof id == 'string') ? document.getElementById( id ) : id;
      n.innerHTML = node;
	}

   removeEvent( vid4, 'click', divClickHandler4 );
} 


function divClickHandler5()
{
   var id = "video5";
	var so = new SWFObject( "http://media.referralcamp.com.s3.amazonaws.com/casestudysales.swf", "csSWF", "640", "498", "9.0.28", "#1a1a1a");
	so.addParam( "quality", "best" );
	so.addParam( "allowFullScreen", "true" );
	so.addParam( "scale", "showall" );
	so.addParam( "allowScriptAccess", "always" );
	so.addVariable( "autostart", "true" );
	if( !so.write( "video5" ) )	
	{
	   var node = '<div id="cs_noexpressUpdate">'
		            + '<p align="center">The Referral Camp video content presented here </p><p align="center"> requires JavaScript to be enabled and the latest version </p><p align="center">of the Adobe Flash Player.  If you are you using </p><p align="center">a browser with JavaScript disabled please enable it now.</p><p align="center"> Otherwise, please update your version of the </p><p align="center">free Flash Player by <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">downloading here</a>. </p>'
               + '</div>'
      var n = (typeof id == 'string') ? document.getElementById( id ) : id;
      n.innerHTML = node;
	}

   removeEvent( vid5, 'click', divClickHandler5 );
} 


function divClickHandler6()
{
   var id = "video6";
	var so = new SWFObject( "http://media.referralcamp.com.s3.amazonaws.com/sharephotosonline-snowmanpicturesofcats.swf", "csSWF", "640", "498", "9.0.28", "#1a1a1a");
	so.addParam( "quality", "best" );
	so.addParam( "allowFullScreen", "true" );
	so.addParam( "scale", "showall" );
	so.addParam( "allowScriptAccess", "always" );
	so.addVariable( "autostart", "true" );
	if( !so.write( "video6" ) )	
	{
	   var node = '<div id="cs_noexpressUpdate">'
		            + '<p align="center">The Referral Camp video content presented here </p><p align="center"> requires JavaScript to be enabled and the latest version </p><p align="center">of the Adobe Flash Player.  If you are you using </p><p align="center">a browser with JavaScript disabled please enable it now.</p><p align="center"> Otherwise, please update your version of the </p><p align="center">free Flash Player by <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">downloading here</a>. </p>'
               + '</div>'
      var n = (typeof id == 'string') ? document.getElementById( id ) : id;
      n.innerHTML = node;
	}

   removeEvent( vid6, 'click', divClickHandler6 );
} 


function pageLoad()
{
try {
	   vid = document.getElementById( "video1" );
	   addEvent( vid, "click", divClickHandler );
   } catch(err) {
	}
   try {
	   vid2 = document.getElementById( "video2" );
	   addEvent( vid2, "click", divClickHandler2 );
   } catch(err) {
	}
try {
      vid3 = document.getElementById( "video3" );
      addEvent( vid3, "click", divClickHandler3 );
} catch(err) {
	}
try {
   vid4 = document.getElementById( "video4" );
   addEvent( vid4, "click", divClickHandler4 );
} catch(err) {
	}
try {
   vid5 = document.getElementById( "video5" );
   addEvent( vid5, "click", divClickHandler5 );
} catch(err) {
	}
try {
   vid6 = document.getElementById( "video6" );
   addEvent( vid6, "click", divClickHandler6 );
} catch(err) {
	}
}