var param;
var YTB;
var GTB;
var ie;
var ns;
var win;

sess="xx";

plug_in();
my_screen();

FL="0";if (pluginlist.indexOf("Flash")!=-1){FL="1";};
WMP="0";if (pluginlist.indexOf("Windows Media Player")!=-1){WMP="1";};
JV="0";if (pluginlist.indexOf("Java")!=-1){JV="1";};
SW="0";if (pluginlist.indexOf("Shockwave")!=-1){SW="1";};
RP="0";if (pluginlist.indexOf("RealPlayer")!=-1){RP="1";};
QT="0";if (pluginlist.indexOf("QuickTime")!=-1){QT="1";};
ACR="0";if (pluginlist.indexOf("Acrobat Reader")!=-1){ACR="1";};
SVG="0";if (pluginlist.indexOf("SVG Viewer")!=-1){SVG="1";};
SCR=swidth+"x"+sheight+"/"+scdepth;

YTBar();
GTBar();

//SetCookie(proNero);

function plug_in(){
		var agt=navigator.userAgent.toLowerCase();
		ie  = (agt.indexOf("msie") != -1);
		ns  = (navigator.appName.indexOf("Netscape") != -1);
		win = ((agt.indexOf("win")!=-1) || (agt.indexOf("32bit")!=-1));
		var mac = (agt.indexOf("mac")!=-1);

//		if (ie && win) {pluginlist = detectIE("Adobe.SVGCtl","SVG Viewer") + detectIE("SWCtl.SWCtl.1","Shockwave Director") + detectIE("ShockwaveFlash.ShockwaveFlash.1","Shockwave Flash") + detectIE("rmocx.RealPlayer G2 Control.1","RealPlayer") + detectIE("QuickTimeCheckObject.QuickTimeCheck.1","QuickTime") + detectIE("MediaPlayer.MediaPlayer.1","Windows Media Player") + detectIE("PDF.PdfCtrl.5","Acrobat Reader"); }
		if (ie && win) {pluginlist = detectIE("Adobe.SVGCtl","SVG Viewer") + detectIE("SWCtl.SWCtl.1","Shockwave Director") + detectIE("ShockwaveFlash.ShockwaveFlash.1","Shockwave Flash") + detectIE("rmocx.RealPlayer G2 Control.1","RealPlayer") + detectIE("PDF.PdfCtrl.5","Acrobat Reader"); }
		if (ns || !win) {
			nse = ""; for (var i=0;i<navigator.mimeTypes.length;i++) nse += navigator.mimeTypes[i].type.toLowerCase();
			pluginlist = detectNS("image/svg-xml","SVG Viewer") + detectNS("application/x-director","Shockwave Director") + detectNS("application/x-shockwave-flash","Shockwave Flash") + detectNS("audio/x-pn-realaudio-plugin","RealPlayer") + detectNS("video/quicktime","QuickTime") + detectNS("application/x-mplayer2","Windows Media Player") + detectNS("application/pdf","Acrobat Reader");
		}

		function detectIE(ClassID,name) { result = false; document.write('<SCRIPT LANGUAGE=VBScript>\n on error resume next \n result = IsObject(CreateObject("' + ClassID + '"))</SCRIPT>\n'); if (result) return name+','; else return ''; }
		function detectNS(ClassID,name) { n = ""; if (nse.indexOf(ClassID) != -1) if (navigator.mimeTypes[ClassID].enabledPlugin != null) n = name+","; return n; }

		pluginlist += navigator.javaEnabled() ? "Java," : "";
		if (pluginlist.length > 0) pluginlist = pluginlist.substring(0,pluginlist.length-1);
	}


function call_stat(){	    
	    param="&SCR="+SCR+"&FL="+FL+"&WMP=-1"+"&JV="+JV+"&SW="+SW+"&RP="+RP+"&QT=-1"+"&ACR="+ACR+"&SVG="+SVG+"&YTB="+YTB+"&GTB="+GTB+"&REF="+ref;
	    if (param.indexOf("sess")==-1){
		param=param+"&sess="+sess2;
    	    }
	    param=param+"&uuid="+uuid;
	    if(document.cookie){
		if(c == ""){
		    param=param+"&sess2="+sess3+"&cookie=2"
		}else{
		    param=param+"&sess2="+sess3+"&cookie="+c;
		}
	    }else{
		param=param+"&sess2=&cookie=";
	    }
	    bild_src = bild_src+"?id="+s_id+"&url="+my_url+"&lang="+mylang+"&descr=&wpid="+wpid+param;
	    document.getElementById("Bild").src =bild_src;
/*	    
	    bild_src2 = bild_src2+"?id="+s_id+"&url="+my_url+"&lang="+mylang+"&descr=&wpid="+wpid+param;
	    document.getElementById("stat").src =bild_src2;
*/	    
	}

function YTBar(){ YTB = -1;}
function GTBar(){ GTB = -1;}

function my_screen(){
    if (document.all||document.getElementById||document.layers){
	swidth=screen.width;
        sheight=screen.height;
	scdepth=screen.colorDepth;
        spdepth=screen.pixelDepth;
    }
}

function SetCookie(value){
    var name = "proNero";
    var now = new Date();
    var expires = new Date(now.setTime(now.getTime() + 1 * 60 * 30 * 1000));
    var TheCookie = name + "=" + escape(value) + ";";
//    TheCookie = TheCookie + " expires=" + expires.toGMTString() +";";
    TheCookie = TheCookie + " expires=NULL;";
    TheCookie = TheCookie + " path=/ ;";
    TheCookie = TheCookie + " domain=.nero.com";
    if (navigator.cookieEnabled == true) {
        document.cookie = TheCookie;
    }
}
function TrackingTest(shop_id,procode,button){
    var img = "shop_"+shop_id;
    var track = "http://stat.nero.com/tracking.php?session="+sess3;
    track = track+"&extern=";
    track = track+"&extern_s=";
    track = track+"&intern=shop_id";
    track = track+"&prod="+shop_id+":"+procode+":"+button;
    track = track+"&ads=";
    document.images[img].src = track;
    setTimeout("document.forms['ShopButtonForm'].submit()",500);
}

