/////////////// LOCATION CHOOSER ///////////////

function changeLocation(){
	val = document.forms['city'].chooser.value;
	if(val!=0){
		parent.location = val;
	} else {
		parent.location = "#";
	}
}


/////////////// LOOKS CHOOSER ///////////////

function showLook(rolly) {
	divShow = rolly;
	if(document.getElementById) {
		document.getElementById(divShow).style.visibility = 'visible';
	} else if(document.layers) {
		document.layers[divShow].style.visibility = 'visible';
	} else {
		document.all[divShow].style.visibility = 'visible';
	}	
}
function hideLook(rollyout) {
	divHide = rollyout;
	if(document.getElementById) {
		document.getElementById(divHide).style.visibility = 'hidden';
	} else if(document.layers) {
		document.layers[divHide].style.visibility = 'hidden';
	} else {
		document.all[divHide].style.visibility = 'hidden';
	}
}





/////////////// FLASHER ///////////////

var flasher;
var colors = ['#ffffff','#ff0000'];
var nextColor = 0;

function flashON(flashhost,flashrate) {
	if(document.getElementById) {
		flasher = document.getElementById(flashhost);
	} else if(document.layers) {
		flasher = document.layers[flashhost];
	} else {
		flasher = document.all[flashhost];
	}
	flashLOOP = setInterval('flasher.style.color=colors[nextColor++%colors.length]',flashrate);
}
function flashOFF(flashhostStop) {
	clearInterval(flashLOOP);
	if(document.getElementById) {
		stopFlasher = document.getElementById(flashhostStop);
	} else if(document.layers) {
		stopFlasher = document.layers[flashhostStop];
	} else {
		stopFlasher = document.all[flashhostStop];
	}
	stopFlasher.style.color='#ff0000';
}



/////////////// OPEN PRODUCT ///////////////

function popPSP() {	
	proj1 = 'Sony_PSP_Playstation_Portable';
	pspURL = '/projects/pspamazeme/psp_product.php';
	arg1 = 'width=565,height=276,left=26,top=26,scrollbars=no';
	popup1 = (document.layers) ? window.open(pspURL, proj1, arg1) : window.open(pspURL, proj1, arg1);
	popup1.focus();	
}

/////////////// OPEN CONSOLE ///////////////

function popMovie(whichMovie) {	
	proj2 = 'PSPmovie';
	movieURL = whichMovie;
	arg2 = 'width=320,height=340,left=26,top=26,scrollbars=no';
	popup2 = (document.layers) ? window.open(movieURL, proj2, arg2) : window.open(movieURL, proj2, arg2);
	popup2.focus();	
}

/////////////// OPEN TERMS ///////////////

function popterms() {
	proj3='terms';
	garmentURL = '/projects/pspamazeme/en/terms.html';
	arg3 = 'width=400,height=400,left=26,top=26,scrollbars=yes';
	popup3 = (document.layers) ? window.open(garmentURL, proj3, arg3) : window.open(garmentURL, proj3, arg3);
	popup3.focus();	
}

/////////////// CHANGE LOCATION ///////////////


function changeLocation(chooser) {
	window.location.href = document.getElementById(chooser).value; 
}

function changePanellist(chooser) {
	document.getElementById(chooser).submit();
}
