var NS4 = (navigator.appName.indexOf("Netscape")>=0 && parseFloat(navigator.appVersion) >= 4 && parseFloat(navigator.appVersion) < 5)? true : false;
var IE4 = (document.all)? true : false;
var NS6 = (parseFloat(navigator.appVersion) >= 5 && navigator.appName.indexOf("Netscape")>=0 )? true: false;
var isload=false;
var txtpanier='##NBARTICLE## <span class=textpanier1> article(s)</span>';
var base= 'http://www.bateliers-arcachon.com/';
var urlredirect='http://www.bateliers-arcachon.com/resa/virtual_session.asp?centrale=arcachon&distributeur=INTERNET&stop=1';


//alert('urlrdirect:'+ urlredirect);

iurl=''+document.location;
tiurl=iurl.split("#");
if (tiurl.length>1) {	
	urlredirect=tiurl[1];	
}
//alert('urlredirect1=' + urlredirect);
function RedirectPanier(){
	//alert('isload='+isload);
	//if (isload){
		frames["factivresa"].location.href=frames["factivresa"].xPanier;
	//}
}

function RedirectSearch(){
	//alert('top.frames["factivresa"].xSearch='+top.frames["factivresa"].xSearch);
	//if (top.isload){
		top.frames["factivresa"].location.href=top.frames["factivresa"].xSearch;
	//}
}

function RedirectLangue(xurl,codelangue){
	//if (top.isload){
		sizelangue=frames["factivresa"].xLangueCode.length;	
		for (var xi=1;xi<=sizelangue-1;xi=xi+1) {		
			if (frames["factivresa"].xLangueCode[xi]==codelangue){
			//alert(xurl+"?xFrame#"+frames["factivresa"].xLangueUrl[xi]);
				document.location.href=xurl+"?xFrame#"+frames["factivresa"].xLangueUrl[xi];
			}	
		}
	//}	
}
function RedirectsuiviDossier(xurl){
	//if (top.isload){
		//alert(frames["factivresa"].xSuivi + '&url=' + xurl);
		top.frames["factivresa"].location.href=top.frames["factivresa"].xSuivi + '&url=' + xurl;
	//}
}

function RedirectPrestation(codeprestation){
	//if (top.isload){
		//alert(frames["factivresa"].xSuivi + '&url=' + xurl);
		window.parent.location.href=window.parent.xSearch + '&TP=' + codeprestation;
	//}
}

function RedirectTC(tc_id){
	//if (top.isload){
		//alert(frames["factivresa"].xSuivi + '&url=' + xurl);
		window.parent.location.href=window.parent.xSearch + '&TOUTCOMPRIS=' + tc_id+ '&TP=HEBERG';
	//}
}

function IndiquelienSuiviDossier(nameforme){
	iurl=''+document.location;
	
	tiurl=iurl.split("#");
	if (tiurl.length>1) {	
		variables=tiurl[1];
		tvariable=variables.split("@@");
		xpass=false;
		
		for (var xi=0;xi<=tvariable.length-1;xi=xi+1) {
			//alert(tvariable[xi])
			if (xpass) {
				//alert('document.' + nameforme + '.action=\''+tvariable[xi]+'\';');
				eval('document.' + nameforme + '.action=\''+tvariable[xi]+'\';');
				xpass=false;
			}
			if ((''+tvariable[xi])=='varxpost'){
				xpass=true;
			
			}
			
		} 
	}

}
function say(){
	str=txtpanier;
	//alert('say')	
	reghref1=/##NBARTICLE##/gi;	
	str=str.replace(reghref1,top.frames["factivresa"].xCount);
	//alert(str);
	str='<span class=textpaniergras1>' + str + '</span>'
	testthis=false;
	if (IE4){	
		document.all.bulleim.innerHTML=str;		
		document.all.bulleim.style.visibility ='visible';	
		testthis=true;
	}
	if (NS6){		
		window.document.getElementById("bulleim").innerHTML=str;		
		window.document.getElementById("bulleim").style.visibility ='visible';	
		testthis=true;
	}
	if (NS4){
		
		document.layers.bulleim.document.open();		
		document.layers.bulleim.document.write(str);		
		document.layers.bulleim.document.close();		
		document.layers.bulleim.visibility="show";
		testthis=true;
		
	}
	if (!testthis){		
		window.document.getElementById("bulleim").innerHTML=str;		
		window.document.getElementById("bulleim").style.visibility ='visible';	
		testthis=true;
	}
	
}
