function showVideoPopup(vdo,cookieName){	
	// IF THERE IS NO COOKIE
	if($.cookie(cookieName)!='true'){
		// SET COOKIE
		$.cookie(cookieName, 'true');
		// SHOW THE VIDEO
		$('body').append('<div id="movie_popup"><div style="clear:both;"><input type="button" id="showForm" value="enquiry form" class="movie_text movie_actions" style="width:115px; margin:5px 5px 5px 10px;" /><input type="button" onclick="window.open(\'docs/The Wealth Shop Product Brochure March 09.pdf\',\'_blank\')" value="download our brochure" class="movie_text movie_actions" style="width:155px; margin:5px 5px 5px 0px;" /><input type="button" onclick="window.open(\'chat.htm?type=nc\',\'_self\')" value="real time live advice" class="movie_text movie_actions" style="width:140px; margin:5px 15px 5px 0px;" /><div id="movie_close">Close</div></div><br style="clear:both;" /><div id="movie_swf"><embed src="ggdplayer/gddflvplayer.swf" flashvars="&autoplay=true&sound=100&desc=&buffer=5&vdo='+vdo+'" width="470" height="307" allowFullScreen="true" quality="best" allowScriptAccess="always"  pluginspage="http://www.macromedia.com/go/getflashplayer"  type="application/x-shockwave-flash"></embed></div><div id="rightForm"><div class="movie_text" style="width:195px; line-height:1.3em;"><b>Submit the enquiry form below and we will contact you directly:</b></div><div style="width:100%; height:6px; clear:both;"></div><form action="ggdplayer/formmail.php" id="videoForm" method="post" style="margin:0px; padding:0px;"><div class="movie_text movie_field"><b>your name:</b><br /><input class="movie_text movie_form" name="Name" id="videoName" type="text" /></div><div class="movie_text movie_field"><b>your phone number:</b><br /><input class="movie_text movie_form" name="Phone_Number" id="videoPhone" type="text" /></div><div class="movie_text movie_field"><b>your email address:</b><br /><input class="movie_text movie_form" name="Email_Address" type="text" /></div><div class="movie_text"><b>your query:</b><br /><textarea name="Query" class="movie_text movie_textarea"></textarea></div><input type="button" value="submit the form" id="videoSubmit" class="movie_text movie_submit" /></div></form></div>');
		// BIND THE FUNCTIONS
		$('#showForm').click(function(){
			if($('#rightForm').css('display') == 'none'){
				$('#movie_popup').css('width','698px');
				$('#rightForm').show("fast");
			}
			else{
				$('#rightForm').hide("fast", function(){
					$('#movie_popup').css('width','');
				});		
			}
		});	
		$('#movie_close').click(function(){
			$('#movie_popup').remove();
		});
		$('#videoSubmit').click(function(){
			validateVideoForm();
		});
	}
}

function validateVideoForm(){
	if($('#videoName').val()==''){
		alert('Your Name is required field.');
		return false;
	}
	if($('#videoPhone').val()==''){
		alert('Your Phone Number is required field.');	
		return false;
	}
	$('#videoForm').submit();
}
function showVideoPopupURL(vdo,cookieName){	
		// SET COOKIE
		$.cookie(cookieName, 'true');
		// SHOW THE VIDEO
		$('body').append('<div id="movie_popup"><div style="clear:both;"><input type="button" id="showForm" value="enquiry form" class="movie_text movie_actions" style="width:115px; margin:5px 5px 5px 10px;" /><input type="button" onclick="window.open(\'docs/The Wealth Shop Product Brochure March 09.pdf\',\'_blank\')" value="download our brochure" class="movie_text movie_actions" style="width:155px; margin:5px 5px 5px 0px;" /><input type="button" onclick="window.open(\'chat.htm\',\'_self\')" value="real time live advice" class="movie_text movie_actions" style="width:140px; margin:5px 15px 5px 0px;" /><div id="movie_close">Close</div></div><br style="clear:both;" /><div id="movie_swf"><embed src="ggdplayer/gddflvplayer.swf" flashvars="&autoplay=true&sound=100&desc=&buffer=5&vdo='+vdo+'" width="470" height="307" allowFullScreen="true" quality="best" allowScriptAccess="always"  pluginspage="http://www.macromedia.com/go/getflashplayer"  type="application/x-shockwave-flash"></embed></div><div id="rightForm"><div class="movie_text" style="width:195px; line-height:1.3em;"><b>Submit the enquiry form below and we will contact you directly:</b></div><div style="width:100%; height:6px; clear:both;"></div><form action="ggdplayer/formmail.php" id="videoForm" method="post" style="margin:0px; padding:0px;"><div class="movie_text movie_field"><b>your name:</b><br /><input class="movie_text movie_form" name="Name" id="videoName" type="text" /></div><div class="movie_text movie_field"><b>your phone number:</b><br /><input class="movie_text movie_form" name="Phone_Number" id="videoPhone" type="text" /></div><div class="movie_text movie_field"><b>your email address:</b><br /><input class="movie_text movie_form" name="Email_Address" type="text" /></div><div class="movie_text"><b>your query:</b><br /><textarea name="Query" class="movie_text movie_textarea"></textarea></div><input type="button" value="submit the form" id="videoSubmit" class="movie_text movie_submit" /></div></form></div>');
		// BIND THE FUNCTIONS
		$('#showForm').click(function(){
			if($('#rightForm').css('display') == 'none'){
				$('#movie_popup').css('width','698px');
				$('#rightForm').show("fast");
			}
			else{
				$('#rightForm').hide("fast", function(){
					$('#movie_popup').css('width','');
				});		
			}
		});	
		$('#movie_close').click(function(){
			$('#movie_popup').remove();
		});
		$('#videoSubmit').click(function(){
			validateVideoForm();
		});
}

function validateVideoForm(){
	if($('#videoName').val()==''){
		alert('Your Name is required field.');
		return false;
	}
	if($('#videoPhone').val()==''){
		alert('Your Phone Number is required field.');	
		return false;
	}
	$('#videoForm').submit();
}
