// JavaScript Document

function openPopup( url, w, h ){

	var mywindow = window.open ( url,"popup","location=0,status=1,scrollbars=1,resizeble=no,width=" + w + ",height=" + h );
		
	mywindow.moveTo(0,0);

	return mywindow;

}

function openTermsAndConditions( regionID, countryID, lang ){
	
	openPopup( "/terms_conditions/index.html?id=" + regionID + "_" + countryID + "_" + lang, 450, 550 );
	
}

function setWindowTitle( newTitle ){
	
	document.title = newTitle;
	
}

function setTrackingLocale( locale ){

	if (console && console.log){
		console.log("locale: " + locale);
	}

	pageTracker._setVar( locale );
	
}

function track( tag ){
	
	//alert( tag );
	
	trackLog("tracking: " + tag);
	
	pageTracker._trackPageview( "/" + tag);
	
}

function trackLog( text ){
	
	if (console && console.log){
		console.log( text );
	}
	
}