// JavaScript Document
// catwalk.js
var previousSelectedModel = "0";

function setPreviousSelectedModel(selectedModelValue){
	previousSelectedModel = selectedModelValue;
}//setPreviousSelectedModel

function applyFilters(sbxName){
	var modelID = "";
	var locationParams = "";
	if (sbxName == "sbxUpdates"){
		document.mainForm.submit();
	}//if (sbxName == "sbxModels")
	else{
 	modelID = document.mainForm.sbxModels.value;
 	locationParams = "model_id=" + modelID;
 	if (members) locationParams = locationParams + "&members=1";
 	document.mainForm.sbxModels.value = previousSelectedModel;
 	window.location = "/PersonalPages/ModelsPersonalPage.php?" + locationParams;
	}//else
}//applyFilters


function loadPersonalPage(locationParams){
	//window.open("http://www.videocatwalk.com/PersonalPages/ModelsPersonalPage.php?" + locationParams);
	window.location = "/PersonalPages/ModelsPersonalPage.php?" + locationParams;
}//loadPersonalPage

function submitMembersLoginForm(){
	document.membersLoginForm.submit();
} 
function submitForgotPasswordForm(){
	document.forgotPasswordForm.submit();
}
function downloadDivX(){
	window.open('http://download.com.com/3001-2194-10112188.html');
}

function createWindowCentered(URLStr, width, height)
{
	if (document.all) {
		var xMax = screen.width, yMax = screen.height;
	} else {
		if (document.layers) {
			var xMax = window.outerWidth, yMax = window.outerHeight;
		} else {
			var xMax = 640, yMax=480;
		}
	}

	var xOffset = (xMax - width)/2, yOffset = (yMax - height)/2;

	oWin = window.open(URLStr, 'PreviewWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+width+',height='+height+',left='+xOffset+',top='+yOffset+'');
}
