function flashPutHref(href) { 
	location.href = href;
}

var MLS = {
	
	openNewWindow: function(url) {
		window.open(url);
	},
	
	openSite: function() {
		var s = location.search;
		spawn('site.asp'+s, 'Site', 1020, 700);
	},
	
	openRegistrationForm: function() {
		
		var url = "/us/register/mls2006/register.asp";
		//var url = "http://www.adidas.com/us/register/mls2006/register.asp";
		var win = "winLarge";
		var w = 620;
		var h = 500;
		var x = (screen.availWidth - w)/2;
		var y = (screen.availHeight - h)/2;
		var features = "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="+w+",height="+h+",screenX="+x+",screenY="+y+",top="+y+",left="+x;
		window.open(url, win, features);
		
	},
	
	gotoUrl: function(url) {
		location.href = url;
	}
	
};


function popUpKadoink(page){
	var screenWidth = screen.width;
	var screenHeight = screen.height;
	
	var newX = (screenWidth/2) - 150;
	var newY = (screenHeight/2)  - 125;
	
	kadoinkWindow = window.open (page,"mywindow","location=0,status=0,scrollbars=0,resize=yes,width=298,height=275");
	kadoinkWindow.focus();
	
	
	kadoinkWindow.moveTo(newX,newY);
}

 
/* ---------------- FROM ORIGINAL SITE ---------------------- */

function spawn(url, nameW, w, h) {
	
	if (navigator.appVersion.indexOf('4') != -1) {
	// Vars for centering the new window on Version 4 Browsers
		x4 = screen.width/2 - (w/2);
		y4 = screen.height/2 - (h/2);
		popwin = window.open(url, nameW, 'height='+h+',width='+w+',scrollbars=0,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0,left=' + x4 + ',top=' + y4 + '');
	} else {
		popwin = window.open(url, nameW, 'height='+h+',width='+w+',scrollbars=0,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0,left=150,top=200');
	}
	popwin.remote = self;
}

/*********************** WINDOW RE-SIZE SCRIPTS ********************************/


function windowFullSize() {
	var screenW;
	var screenH;
	if (parseInt(navigator.appVersion)>3) {
		//screenW = screen.width;
		//screenH = screen.height;
		screenW = screen.availWidth;
		screenH = screen.availHeight;
	} else if (navigator.appName == "Netscape" && parseInt(navigator.appVersion)==3 && navigator.javaEnabled()) {
		var jToolkit = java.awt.Toolkit.getDefaultToolkit();
		var jScreenSize = jToolkit.getScreenSize();
		screenW = jScreenSize.width;
		screenH = jScreenSize.height;
	} 
	self.moveTo(0,0);
	self.resizeTo(screenW, screenH);
}
