//product frame preload
cImage1 = new Image();
cImage1.src = "/shop_app/app_GB/dynamic/data/topic/img/en/pixel.gif";
cImage2 = new Image();
cImage2.src = "/shop_app/app_GB/dynamic/data/topic/img/en/corner1.gif";
cImage3 = new Image();
cImage3.src = "/shop_app/app_GB/dynamic/data/topic/img/en/corner2.gif";
cImage4 = new Image();
cImage4.src = "/shop_app/app_GB/dynamic/data/topic/img/en/corner3.gif";
cImage5 = new Image();
cImage5.src = "/shop_app/app_GB/dynamic/data/topic/img/en/corner4.gif";


function popin(pPath,pX,pY)
{
	if(is_nav6up || is_gecko || is_ie5_5up || is_opera7up)
	{	
	overlib('<img src="'+pPath+'">'
	,  STICKY, FIXX, pX , FIXY, pY, WIDTH, 1, HEIGHT, 1, FGCOLOR, '#66CC99', BGCOLOR,'#66CC99',	BORDER, ((ns4) ? 2 : 0));	
		//setTimeout('cClick()',18000);
	}
}

function popin2(pPath,pX)
{
    cImage = new Image();
    cImage.src = pPath;
	setTimeout('overlib(\'<a href="javascript:cClick2();"><img src="'+pPath+'" border="0" /></a>\'	,  STICKY, FIXX, '+pX+' , FIXY, document.body.scrollTop+50, WIDTH, 1, HEIGHT, 1, FGCOLOR, \'#66CC99\', BGCOLOR,\'#66CC99\',	BORDER, ((ns4) ? 2 : 0));	',150);
	dropHide(1);
	void(0);
}

function cClick2 (popSel)
{
	cClick();
	dropHide(0);
	void(0);
}

function MM_jumpMenu(targ,selObj,restore)
{ //v3.0
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}

// detection de la version de Flash
var ovContent='';
var flashVersion = 0;
var flashVersion_DONTKNOW = -1;

function getFlashVersion()
{
	var agent = navigator.userAgent.toLowerCase(); 

	// NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Flash plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length>0)
	{
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if (typeof flashPlugin == 'object')
		{ 
			if (flashPlugin.description.indexOf('8.') != -1) flashVersion = 8;
			else if (flashPlugin.description.indexOf('7.') != -1) flashVersion = 7;
			else if (flashPlugin.description.indexOf('6.') != -1) flashVersion = 6;
			else if (flashPlugin.description.indexOf('5.') != -1) flashVersion = 5;
			else if (flashPlugin.description.indexOf('4.') != -1) flashVersion = 4;
			else if (flashPlugin.description.indexOf('3.') != -1) flashVersion = 3;
		}
	}
	// IE4+ Win32:  attempt to create an ActiveX object using VBScript
	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion)>= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1)
	{
		document.write('<scr' + 'ipt language="VBScript"\>\n');
		document.write('on error resume next \n');
		document.write('dim obFlash \n');
		document.write('set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.8") \n');
		document.write('if IsObject(obFlash) then \n');
		document.write('flashVersion = 8 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.7") end if \n');
		document.write('if flashVersion< 8 and IsObject(obFlash) then \n');
		document.write('flashVersion = 7 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.6") end if \n');
		document.write('if flashVersion< 7 and IsObject(obFlash) then \n');
		document.write('flashVersion = 6 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.5") end if \n');
		document.write('if flashVersion< 6 and IsObject(obFlash) then \n');
		document.write('flashVersion = 5 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.4") end if \n');
		document.write('if flashVersion< 5 and IsObject(obFlash) then \n');
		document.write('flashVersion = 4 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.3") end if \n');
		document.write('if flashVersion< 4 and IsObject(obFlash) then \n');
		document.write('flashVersion = 3 \n');
		document.write('end if');
		document.write('</scr' + 'ipt\>\n');
	}
	// WebTV 2.5 supports flash 3
	else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;
	// older WebTV supports flash 2
	else if (agent.indexOf("webtv") != -1) flashVersion = 2;
	// Can't detect in all other cases
	else {flashVersion = flashVersion_DONTKNOW;}
	return flashVersion;
}
totoro = getFlashVersion();


// convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase();

    // *** BROWSER VERSION ***
    // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);

    // Note: Opera and WebTV spoof Navigator.  We do strict client detection.
    // If you want to allow spoofing, take out the tests for opera and webtv.
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));

    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));
    var is_gecko = (agt.indexOf('gecko') != -1);


    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));

    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );

    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);


    var is_opera = (agt.indexOf("opera") != -1);
    var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
    var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
    var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
    var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
    var is_opera6 = (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1);
    var is_opera7 = (agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1);
    var is_opera7up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4 && !is_opera5 && !is_opera6);


function dropHide(hide)
{
	if(hide==1) {vState="hidden"}
	else        {vState="visible"}
	for (i=0; i < document.topic.elements.length; i++)
	{
		document.topic.elements[i].style.visibility = vState;
	}
	if (document.getElementById('menu1')){document.getElementById('menu1').style.visibility = vState;}
}

function prodinfo (caption,image,description,counter,number)
{
	if(is_nav6up || is_gecko || is_ie5_5up || is_opera7up)
	{
		overlib("<table cellspacing='0' cellpadding='2'><tr><td class='ovTop'>"
   		+"<table width='100%' cellspacing='0' cellpadding='1'><tr><td width='1'><img src='shared/img/"+iso+"/empty.gif' height='6' width='1'></td><td class='oDisclaimer2'><b>"+caption+"</b></td>"
		+"<td class='oDisclaimer2' align='right'><a href='javascript:void(0)' onClick='javascript:cClick();dropHide();'><u>"+closeTxt+"</u></a>&nbsp;</td></tr></table>"
   		+"</td></tr><tr><td class='ovBottom'>"
   		+"<table width='450' cellspacing='2' cellpadding='2'><tr>"
   		+"<td valign='top' class='limenu12b'><img alt='"+closeTxt+"' name='test01' src='dynamic/data/product/img/"+iso+"/"+image+"' width='168' height='216' border='0'></td>"
   		+"<td valign='top' colspan='2'><span class='fontgrey'>"+description+"</span><br>"
		+"</td></tr><tr><td>&nbsp;</td><td align='right'>"
		+"<a href=\"javascript:addProductToBasket"+number+"();\"><img src=shared/img/"+iso+"/my_basket31.gif border='0' width='81' height='31'></a>"
		+"</td></tr></table>"
		+"</td></tr></table>"
		, VAUTO, STICKY, FIXX, 240, OFFSETY, -50, WIDTH, 450, FGCOLOR, 'white', BGCOLOR,'#66CC99', BORDER, ((ns4) ? 2 : 0));
		dropHide(1);
	}
	else
	{
		link('nav=product&articleNo='+number);
	}
}


function pricex2(price)
{
	tnum=Math.round(price.replace(",",".")*200)+"";
	tnlngt=tnum.length;
	tnum3=tnum.charAt(tnlngt-5)+tnum.charAt(tnlngt-4)+tnum.charAt(tnlngt-3)+","+tnum.charAt(tnlngt-2)+tnum.charAt(tnlngt-1)
	document.write(tnum3);
}