// shortcut

d=document;

// generic popwin function

function popwin(url,name,width,height){
var t=(screen.height-height)/2;
var l=((screen.width-width)/2);
window.open(url,name,'width='+width+',height='+height+',top='+t+',left='+l+',location=0,status=0,scrollbars=0,toolbar=0,resizeable=no,noresize');
}

// popscroll function - adds a scrollbar

function popscroll(url,name,width,height){
var t=(screen.height-height)/2;
var l=(screen.width-width)/2;
window.open(url,name,'width='+width+',height='+height+',top='+t+',left='+l+',location=0,status=0,scrollbars=1,toolbar=0,resizeable=no,noresize');
}

// pop stuff

function pop_terms(){
	popscroll ('pop_legal.php?which=terms','terms',490,500);
}

function pop_privacy(){
	popscroll ('pop_legal.php?which=privacy','privacy',490,500);
}

function pop_video(video,width,height,format,color){
	if(format=="mov"){
		popwin ('pop_video.php?video='+video+'&width='+width+'&height='+height+'&format='+format+'&color='+color,'video',width+26,height+42);
	}else{
		popwin ('pop_video.php?video='+video+'&width='+width+'&height='+height+'&format='+format+'&color='+color,'video',width+26,height+73);
	}
}

function pop_aim(color){
	popscroll ('pop_aim.php?color='+color,'aim',490,500);
}

function pop_register(){
	popwin ('http://www.sonypictures.com/movies/deucebigalow/register.html','aim',485,500);
}

function pop_sound(){
	popwin ('pop_sound.php','sound',464,494);
}

function pop_leave(url,color){
	popwin ('pop_leave.php?link='+url+'&color='+color,'leave',400,250);
}

function pop_promotion() {
	popscroll ('http://www.sonypictures.com/movies/deucebigalow/promotions/','promotion',555,800);
}