function VBLogin() {
	vblogin.submit();
}

function AgreeToTerms() {
	if(form.member_password.value == "") {
		alert('Please enter a password');
		form.member_password.focus();
		return false;
	}
	if(form.member_password.value != form.confirm_password.value) {
		alert('Please confirm your password again');
		form.confirm_password.value='';
		form.confirm_password.focus();
		return false;
	}
	if(! form.agree.checked) {
		alert('Please read and acknowledge your acceptance of our Terms & Conditions');
		return false;
	}

	return true;
}

function OpenRap(cid,md5) {
	var wid	= 760;
	var ht	= 500;
	var winl= (screen.width-wid)/2;
	var wint= (screen.height-ht)/2;
	var theName = "popup";
	var theOptions = "height="+ht+",width="+wid+",top="+wint+",left=" + winl+",scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=no,dependent=no";
	theWin = window.open("http://www.strengthnet.tv/chatbeta/?cid="+cid+"&md5="+md5+"",theName,theOptions);
}

function EmailArticle() {
	if(! form.to.value) {
		alert('Please enter the email to send this article to...');
		form.to.focus();
		form.to.style.background='#FFFFCC';
		return false;
	}
	if(! form.from.value) {
		alert('Please enter your email address...');
		form.from.focus();
		form.from.style.background='#FFFFCC';
		return false;
	}
}

function AddToFavorites(cid,what,id) {
	var addfav = new Image;
	addfav.src="/models.php?addfav="+cid+"&"+what+"="+id+"";
	if(what=="mid") { alert('This model has been added to your favorites.'); }
	if(what=="pid") { alert('This picture has been added to your favorites.'); }
	if(what=="vid") { alert('This video has been added to your favorites.'); }
	if(what=="sid") { alert('This snapshot has been added to your favorites.'); }
}

function CacheNav() {
	if(document.images) {
		var ons = new Array('home','models','zine','rap','gear','agency','join','support');
		for(i=0; i<ons.length; i++) {
			var gtf = new Image;
			gtf.src = "/pics/nav/"+ons[i]+"_ov.gif";
		}
	}
}

function popwin(page) {
	PWidth = "650";
	PHeight = "460";
	self.name = "strengthnet";
	popwindow=window.open(page, "popup", "toolbar=0, scrollbars=1, location=0, status=0, menubars=0, resizable=1, width="+PWidth+", height="+PHeight);
	popwindow.window.moveTo((screen.width/2)-(PWidth/2),(screen.height/2)-(PHeight/2));
}

function snpopwin(page, PWidth, PHeight) {
	window.open(page,"popup","toolbar=0, scrollbars=1, location=0, status=0, menubars=0, resizable=1, width="+PWidth+", height="+PHeight);
}

function MessagesCheckAll() {
	for (var i=0; i < document.mail.elements.length; i++) {
		var SelectedElement = document.mail.elements[i];
		if (SelectedElement.name != 'CheckBoxes') {
			SelectedElement.checked = document.mail.CheckBoxes.checked;
		}
	}
}

