var vid;  
var vid2; 

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;
   }
}

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 divClickHandler2()
{
   var id = "video2";
	var so2 = new SWFObject( "http://media.referralcamp.com.s3.amazonaws.com/thelawofsuccess.swf", "csSWF", "640", "498", "9.0.28", "#1a1a1a");
	so2.addParam( "quality", "best" );
	so2.addParam( "allowFullScreen", "true" );
	so2.addParam( "scale", "showall" );
	so2.addParam( "allowScriptAccess", "always" );
	so2.addVariable( "autostart", "true" );
	if( !so2.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 divClickHandler()
{
   var id = "video1";
	var so = new SWFObject( "http://media.referralcamp.com.s3.amazonaws.com/nichemarketnicheproducts.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 handleError() {
	return true;
}

function pageLoad()
{
	try {
	   vid = document.getElementById( "video1" );
	   addEvent( vid, "click", divClickHandler );
	} catch(err) {
	}
	try {
	   vid2 = document.getElementById( "video2" );
	   addEvent( vid2, "click", divClickHandler2 );
	} catch (err) {
	}

}
