var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);

var agt=navigator.userAgent.toLowerCase();
var firefox = 0;
if (agt.indexOf("firefox") != -1) firefox=1;

function element(id)
{
	if(ie4)	// Explorer 4
		return document.all[id];
	else	// Explorer 5+ Netscape 6+ and Mozilla and Firefox
		return document.getElementById(id);
}


function callWindow(title, width, height)
{
  window.open("",title,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=" + width + ",height=" + height);
}

function View_flv(obj,flvurl, widthflv , heightflv)
{
	var FO = { movie:"./flvplayer.swf",width:widthflv,height:heightflv,majorversion:"7",build:"0",bgcolor:"#FFFFFF",
             flashvars:"file="+ flvurl +"&showdigits=true&autostart=true&repeat=true" };
  UFO.create(FO, "flv");
}


function View_flv_byId(var_div, var_video, size_x, size_y, playerHeight, language)//4 videos : playerHeight = 425
{
 var FO = { movie:"./flvplayer.swf",width:size_x,height:playerHeight,majorversion:"7",build:"0",bgcolor:"#FFFFFF",
             flashvars:"file=playlist"  + language + ".xml&displayheight=" + size_y + "&repeat=true&lightcolor=0xFF8C40&backcolor=0x000000&frontcolor=0xCCCCCC&thumbsinplaylist=true&autostart=true&fullscreenpage=fullscreen2.php&showfsbutton=true&showdigits=true" };
  UFO.create(FO, var_div);
}

function luncherMovie(obj)
{
	var j = 0;
	var var_tab = obj.split('_');
	
	while(element(var_tab[0]+ '_' + var_tab[1] + '_' + (j + 1)) != null)//valide pour vign_video_1 par exemple
		{
			if ((j + 1) == parseInt(var_tab[var_tab.length - 1]))
				{
					element(obj).src = "./images/" + obj + "_on.jpg";
					View_flv_byId("flv", 'http://visimmo3d.com/video/' + obj + '.flv', 400, 260, 384);
				}
				else{
					var var_src = var_tab[0]+ '_' + var_tab[1] + '_'  + (j + 1);
					element(var_src).src = "./images/" + var_src + ".jpg";
				}
			j++;
		}
}
