//XITI MARKET FOR PATNER LOCATOR  
//Mathieu GROS (MGS-Multimedia) 0390675412
//Release 2  - 21/05/2007



//############### Functions  ###########
function request(cle,dl)
{
cle=(cle+"=").toLowerCase()
dl+=""
vl=dl.substring(dl.toLowerCase().indexOf(cle)+cle.length,dl.length)
if (vl.indexOf("&")!=-1) vl=vl.substring(0,vl.indexOf("&"))
if (dl.toLowerCase().indexOf(cle)==-1) vl=""
return unescape(vl).replace(/\</,"&lt;")
}




//############### Default variables ###########
var HostLimitation ="www.partnerlocator.alcatel-lucent.com"
var currURL=document.location.toString().toLowerCase()
var Level2Site = "1"	// =  language  (Default = EN)
var PageName = "undefined::"+currURL  //page name by default





//############### Multicritere ###########
currentLanguage=request("lang",currURL).toUpperCase()



//############### results search Sub-level ###########

if (self.initArrayMain)  initArrayMain()
if (self.initArraySecond)  initArraySecond()

nbResult=0
if (self.sortArrayMain) nbResult+=sortArrayMain.length
if (self.sortArraySecond) nbResult+=sortArraySecond.length


//############### Chapeter & Lebel 2 Site Calculation ###########
if (currURL.indexOf("fosysearchform")!=-1) 
	{
	Level2Site = "1" 
	PageName = "Search%20Form"
	}
	
if (currURL.indexOf("plcompanysearch")!=-1) 
	{
	Level2Site = "2" 
	PageName = "Results%20(Company%20Mode)::"+ nbResult+"%20results"
	}
if (currURL.indexOf("plassistedsearch")!=-1)
	{
	Level2Site = "2" 
	PageName = "Results%20(Assisted%20Mode)::"+ nbResult+"%20results"
	}
if (currURL.indexOf("agsydisplayform")!=-1) 
	{
	Level2Site = "3" 
	PageName = request("ID",currURL)
	}



//############### Parameters (DO NOT MODIFY)  ###########



//Multicriteres
xt_multc_init = xt_multc = "&x1="+currentLanguage
//do not modify below
if (window.xtparam!=null){window.xtparam+=xt_multc;}
else {window.xtparam =xt_multc;};

//standard
xtnv = document;        //parent.document or top.document or document         
xtsd = "http://logi5";
xtsite = "310062";			// ID of the partner locator in XITI dabatabse
xtn2 = Level2Site;        // level 2 site 
xtpage = PageName;        //page name (with the use of :: to create chapters)
xtdi = "";        //implication degree


if (document.location.host==HostLimitation) document.write('<script type="text/javascript" src="($Attachments)/Utils/$File/xiti.js"><'+'/'+'script>')

//DEBUG (intranet only)
if (document.location.host=="frdom095.sxb.bsf.alcatel.fr") window.status="Level 2=" +Level2Site + " / Page Name="+PageName + " / Language="+ currentLanguage
