//Function for the location selectbox
function warpTo(logid,moves){
	if(logid != -1){
		if(moves){
			window.location.href = 'index.php?moves=true&log_id=' + logid;
		}else{
			window.location.href = 'index.php?log_id=' + logid;		
		}
	}
}

function popper(url,w,h){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	window.open(url,null,"toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=" + w + ",height=" + h + ",left=" + LeftPosition + ",top=" + TopPosition);		
}

function link2Video(sid){
	if(parent == window){//geen frames
		document.location.href = "vfs.php?sequence_id=" + sid;
	}else{
		parent.leftFrame.document.location.href = "video_left.php?sequence_id" + sid;
	}
}

function checkMF(){
	if(document.forms[0].sender.value == ""){
		alert("You must provide a sender");
	}else if(document.forms[0].message.value == ""){
		alert("You must provide a message");
	}/*else if(document.forms[0].message.value.toString().length > 125){
		alert("Message cannot contain more then 125 characters");
	}*/else if(document.forms[0].sender.value.toString().length > 25){
		alert("Name cannot contain more then 25 characters");	
	}else{
		document.forms[0].submit();	
	}
}

function checkFrame(){
	if(parent == window){
 		document.location = "vfs.php?right=" + document.location;
	}
}

