/*
function DC_SetCookie(cookieName,cookieValue,nDays) { //  head.php
 		var today = new Date();
 		var expire = new Date();
 		if (nDays==null || nDays==0) nDays=1;
 		expire.setTime(today.getTime() + 3600000*24*nDays);
 		document.cookie = cookieName+'='+escape(cookieValue)
 	            	    + ';expires='+expire.toGMTString();
}

function DC_ReadCookie(cookieName) { //  head.php
 		var theCookie=''+document.cookie;
 		var ind=theCookie.indexOf(cookieName);
		if (ind==-1 || cookieName=='') return ''; 
 			var ind1=theCookie.indexOf(';',ind);
 			if (ind1==-1) ind1=theCookie.length; 
 			return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}
*/

function watchSampleVideo(filename) { // index.php
//	if (DC_ReadCookie('hasSignedUp')) {	
	  window.open(filename,"","width=470,height=600,toolbar=no,resizable");
//	} else {
//	  window.open(filename,"","width=470,height=600,toolbar=no,resizable");
//	  alert("Please remember to sign-up for our newsletter to receive the latest news about our training videos! /n/nIf you have already signed up for the newsletter, we thank-you and welcome you to DressageClinic.com.");
//	}
}

	
function jumpToTop() { // index.php
		target = "parent";
		eval(target+".location='#top'");
}


function policywindow(fname) {
	window.open(fname,'','width=500,height=400,toolbar=no,scrollbars=yes');
}

function showVideoInfo() {
	window.open('videoinfo.html','','width=160,height=220,screenX=window.pageXOffset,screenY=window.pageYOffset,status=no,toolbar=no,titlebar=no');
}

function watchSampleVideo(fname,samp_num) {
	window.open(fname,"","width=500,height=675,toolbar=no,resizable");
}


function jumpToTrainer() {
	target = "parent";
	eval(target+".location='"+document.jump.menu.options[document.jump.menu.selectedIndex].value+"'");
	document.jump.menu.selectedIndex = 0;
}

function watchSpecialFeature(fname) {
	if (user_logged_in == true) {
		window.open(fname,"","width=500,height=675,toolbar=no,resizable");
	} else {
		document.location = "signin.php";
	}
}

function playVideo(trainerid,fullname,videono) {
	if (user_logged_in == true) {
		window.open("/playvideo.php?t="+trainerid+"&n="+fullname+"&v="+videono,"","width=500,height=675,toolbar=no,resizable");
	} else {
		document.location = "/signin.php?t="+trainerid+"&n="+fullname+"&v="+videono;
	}
}
function playQTVideo(trainerid,fullname,videono) {
	if (user_logged_in == true) {
		window.open("/playqtvideo.php?t="+trainerid+"&n="+fullname+"&v="+videono,"","width=500,height=570,toolbar=no,resizable");
	} else {
		document.location = "/signin.php?t="+trainerid+"&n="+fullname+"&v="+videono;
	}
}
function playswfVideo(trainerid,fullname,videono) {
	if (user_logged_in == true) {
		window.open("/playswfvideo.php?t="+trainerid+"&n="+fullname+"&v="+videono,"","width=800,height=600,toolbar=no,resizable,scrollbars=yes");
	} else {
		document.location = "/signin.php?t="+trainerid+"&n="+fullname+"&v="+videono;
	}
}
function playNextPart(partno) {
	document.form_PlayVideoPortion.VideoPartNumber.value = "Part" + partno;
	document.form_PlayVideoPortion.submit();
}
	function playVideoFullScreen() {
	var p_player = document.getElementById("videoplayer");
	p_player.DisplaySize = 3;
}

/*
<?php //check for login
	if (isset($_SESSION['session_UserID'])) {
		echo "var user_logged_in = true;";
	} else {
		echo "var user_logged_in = false;";
	}
?>
*/
