function SetLanguge()
{
	var Loc = document.location.href;
	
	if ( Loc.indexOf('00_AN') != -1)
	{
		Loc = Loc.replace('00_AN', '00_FR');
	}
	else
	{
		Loc = Loc.replace('00_FR','00_AN');
	}
	
	document.location = Loc;
}

function QueryString(Properties)
{
	if (document.location.href.indexOf("?") != -1)
	{
		var arrg = document.location.href.split("?");
		var list = arrg[1].split("&");
		var pro ;
		for(i = 0; i < list.length; i++)
		{
			pro = list[i].split("=")

			if (pro[0] == Properties)
				return pro[1].replace('%20' , ' ');
			pro = ""
		}
	}
	else
	{
		return null;
	}
		
}

function SelectMenu ()
{
	if (menu_select == -1)
		return;
		
	var menuarray = new Array();
		
	if (menu_select == 9)
		var menu = "Menu_04";
	else
		var menu = "Menu_0"+menu_select;
		
	
	menuarray[1] = "../00_images/menu/menu_home_01.gif";
	menuarray[2] = "../00_images/menu/menu_whatsnew_01.gif";
	menuarray[3] = "../00_images/menu/menu_company_01.gif";
	menuarray[4] = "../../00_images/menu/menu_catalogue_01.gif";
	menuarray[5] = "../00_images/menu/menu_faq_01.gif";
	menuarray[6] = "../00_images/menu/menu_contactus_01.gif";
	menuarray[7] = "../00_images/menu/menu_testimonies_01.gif";
	menuarray[8] = "../00_images/menu/menu_dealers_01.gif";
	menuarray[9] = "../00_images/menu/menu_catalogue_01.gif";
	
	document.images[menu].src = menuarray[menu_select];
	
}

function findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function iFrame(iFrameName)
{
	//Variable d'initialisation
	this.isInit = false;
	
	//Variable Private
	this.pName = iFrameName;
	this.pFrame = null;
	this.pFrame = findObj(iFrameName);
	if (this.pFrame != null)
		this.isInit = true;
		
	//Variable Global
	this.Document = null;
	this.Form = null;
	this.Window = null;
		
	return this;
}

iFrame.prototype.ReLoad = function()
{
	this.pFrame = findObj(this.pName);
	if (this.pFrame != null)
		this.isInit = true;
}

iFrame.prototype.close = function()
{

}

iFrame.prototype.SetLocation = function(loc)
{
	if (this.isInit)
		this.pFrame.src = loc;
}

iFrame.prototype.GetLocation = function()
{
	if (this.isInit)
		return this.Document.title + '.php';
}

