// *****************************************
// AUTOOPEN-FUNCTION GOLF
// *****************************************

var	fspPage			= 'http://www.nuovagti.com/ws';
var tc = "";
var winw    	 	= 800;
var winh     		= 600;
var action;
var dl = document.location + "";

function getVars() {
	varArray = document.location.href.split('?')[1].split('&');
	for(var x=0; x<varArray.length; x++){
		var tmp = varArray[x].split('=');
		eval(unescape(tmp[0]) + '="' + unescape(tmp[1]) + '"');
	}
}

function openFSP() { 
	try {
		fsp = window.open(fspPage,"FSP","width="+winw+",height="+winh);
		if ( !fsp  || typeof(fsp ) != 'object' || fsp .closed ) {
			throw "notopen"; 
		} else {
			throw "open"; 
		}
	} catch(e) {
		if ( e == "notopen" ) {
			location.href = blockerPage;
		} else if ( e == "open" ) {
			fsp.focus();
			setTimeout("fsp.focus()", 500);
		} 
	}
}
if (window.location.search != "") {
	getVars();
}

var blockerPage 	= 'http://it.volkswagen.com/etc/medialib/vwcms/virtualmaster/it/models/golf6.Par.0001.File.html?culture=it_IT&tc=' + tc; 

 if ( (dl.indexOf('/Golf_GTI.html') > -1 || dl.indexOf('/Golf.html') > -1 || dl.indexOf('/Golf.tracking.htx') > -1 || dl.indexOf('/Golf.htx') > -1) && action != 'no' ) {
      // autoopen auf golf startseite
      openFSP();
 } 