
var jEF;
var jCLID;
var jPGID;
var jLTID;
var jMPID;
var jCFID;
var jLC;
var jByPass;
var jBaseServer;
var jReferer;

var jShowSearch;
var jPAGEType;

var newWin;

function onNav(id,hlbg,navid,hlf){
	
	if (( !is.ns4) && ( !is.ns5)){
		eval(id).style.backgroundColor=hlbg;
		eval("NavFont"+navid).style.color=hlf;
	}
}

function onNavSideIn(id,hlbg,navid,hlf){
	
//	if (( !is.ns4) && ( !is.ns5)){
//		eval("NavFont"+navid).style.fontWeight="bold";
//	}

	
	if (( !is.ns4) && ( !is.ns5)){
		eval("NavFont"+navid).style.textDecoration="underline";
	}

}

function onNavSideOut(id,hlbg,navid,hlf){
	
//	if (( !is.ns4) && ( !is.ns5)){
//		eval("NavFont"+navid).style.fontWeight="";
//	}
	if (( !is.ns4) && ( !is.ns5)){
		eval("NavFont"+navid).style.textDecoration="";
	}
}

function onNavS(id,hlbg,navid,hlf,onoff){
	
	if (( !is.ns4) && ( !is.ns5)){
//		eval(id).style.backgroundColor=hlbg;

	//	eval("bga"+navid+".style.backgroundColor=hlbg;")
	//	eval("bgb"+navid+".style.backgroundColor=hlbg;")
	
		if (eval("NavFont"+navid+".style.fontWeight")=="bold"){
			eval("NavFont"+navid+".style.fontWeight='normal';")
		}
		else{
			eval("NavFont"+navid+".style.fontWeight='bold';")
		}


		eval("NavFont"+navid).style.color=hlf;
	}
}

function navOpenNew(strhttp){
	
	var popWin=window.open(strhttp);

}


function HScroller(NS){
	if (NS==0){
		//myScroller1.hide();
		if (numberBulletins>1){
			mscrl.hide();
		}
	}
}

function SScroller(NS){
	if (NS==0){
		//myScroller1.show();
		if (numberBulletins>1){
			mscrl.show();
		}
	}
}

function showError(passEF){

	if (passEF==1){
		alert("Site déconnecté");
	}
	else{
		alert("Site is Offline");
	}
		

}

function showSearch(){

	if (isFilled(document.RT.pSearch.value) == true) {
		
		document.RT.action=jBaseServer+"/web/search.asp"
		document.RT.submit();

	}

}

function checkReturnA(kp) {

  var whichCode = (window.Event) ? kp.which : kp.keyCode;
  
	if (whichCode == 0){
		return false;
	}
	else
	{
	return true;
	}

}

//Support Section links

function showPage(pid,pwin){

	if (pwin==0){
		window.location=jBaseServer+"/web/page.asp?ppgid="+pid+"&plc="+jLC+"&pbypass="+jByPass;
	}
	else{
		newWin=window.open(jBaseServer+"/web/page.asp?ppgid="+pid+"&plc="+jLC+"&pbypass="+jByPass);
	}


}

function showSite(pid,pwin){

	if (pwin==0){
		window.location=jBaseServer+"/web/gateway.asp?pclid="+pid+"&pef="+jEF+"&pbypass="+jByPass;
	}
	else{
		newWin=window.open(jBaseServer+"/web/gateway.asp?pclid="+pid+"&pef="+jEF+"&pbypass="+jByPass);
	}

}

function showExternal(phttp,pwin){


	if (pwin==0){
		window.location=phttp;
	}
	else{
		newWin=window.open(phttp);
	}
	
}

function showList(pid,pwin){

	if (pwin==0){
		window.location=jBaseServer+"/web/list.asp?pltid="+pid+"&pef="+jEF+"&pbypass="+jByPass+"&plc="+jLC;
	}
	else{
		newWin=window.open(jBaseServer+"/web/list.asp?pltid="+pid+"&pef="+jEF+"&pbypass="+jByPass+"&plc="+jLC);
	}
	
}

function showMarket(pid,pwin){

	if (pwin==0){
		window.location=jBaseServer+"/web/market.asp?pmpid="+pid+"&pef="+jEF+"&pclid="+jCLID+"&pbypass="+jByPass+"&plc="+jLC;
	}
	else{
		newWin=window.open(jBaseServer+"/web/market.asp?pmpid="+pid+"&pef="+jEF+"&pclid="+jCLID+"&pbypass="+jByPass+"&plc="+jLC);
	}
	
}

function showClassified(pid,pwin){

	if (pwin==0){
		window.location=jBaseServer+"/web/classifieds.asp?pcfid="+pid+"&pef="+jEF+"&pclid="+jCLID+"&pbypass="+jByPass+"&plc="+jLC;
	}
	else{
		newWin=window.open(jBaseServer+"/web/classifieds.asp?pcfid="+pid+"&pef="+jEF+"&pclid="+jCLID+"&pbypass="+jByPass+"&plc="+jLC);
	}
	
}

function showLibrary(pfilename,pwin){

	if (pwin==0){
		window.location=jBaseServer+"/library/"+pfilename;
	}
	else{
		newWin=window.open(jBaseServer+"/library/"+pfilename);
	}

}

function showFirstPhoto(pID){

	window.location=jBaseServer+"/web/galleryDTL.asp?pef="+jEF+"&pclid="+jCLID+"&pid="+pID+"&prefpg="+escape(jURL)+"&pbypass="+jByPass+"&plc="+jLC;

}

function scrollPhoto(pID){
	window.location=jBaseServer+"/web/galleryDTL.asp?pef="+jEF+"&pclid="+jCLID+"&pid="+pID+"&pbypass="+jByPass+"&plc="+jLC+"&prefpg="+escape(jREFPG);

}

function adClick(pid){

	var MyAd=window.open(jBaseServer+'/web/proc/adUPDATE.asp?pid='+pid+'&pclid='+jCLID,'MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=100,height=100,screenX=20,screenY=20,top=20,left=20');
	MyAd.blur()


}

function showEvent(pid){

	var MyWindow2=window.open(jBaseServer+'/web/proc/eventLOOKUP.asp?pid='+pid+'&pef='+jEF+'&pcal=0&pclid='+jCLID+'&pbypass='+jByPass,'MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=100,height=100,screenX=20,screenY=20,top=20,left=20');


}


function emailtoafriend(){

	var winRemind = window.open(jBaseServer+"/web/sendtoafriend.asp?pCLID="+jCLID+"&pEF="+jEF+"&preferer="+escape(jReferer),"_blank","width=475,height=420");

}

function submitSendtoaFriend(){
	
	if (isFilled(document.sendtoafriend.pSendFriendTo.value)==false){
		if (jEF==1){
			alert("SVP inscrire l'adresse de votre correspondant.");
		}
		else{
			alert("There is an error with the recipients' email.");
		}
		document.sendtoafriend.pSendFriendTo.focus();
		return false;
	}
	
	if (isEmail(document.sendtoafriend.pSendFriendTo.value)==false){
		if (jEF==1){
			alert("SVP inscrire l'adresse de votre correspondant.");
		}
		else{
			alert("There is an error with the recipients' email.");
		}
		document.sendtoafriend.pSendFriendTo.focus();
		return false;
	}

	if (isFilled(document.sendtoafriend.pSendFriendEmail.value)==false){
		if (jEF==1){
			alert("SVP inscrire l'adresse de votre correspondant.");
		}
		else{
			alert("Please enter your email address.");
		}
		document.sendtoafriend.pSendFriendEmail.focus();
		return false;
	}
	
	if (isEmail(document.sendtoafriend.pSendFriendEmail.value)==false){
		if (jEF==1){
			alert("SVP indiquez votre adresse électronique.");
		}
		else{
			alert("There is an error with your email address.");
		}
		document.sendtoafriend.pSendFriendEmail.focus();
		return false;
	}


	document.sendtoafriend.submit();

}

function goBack(){

	history.go(-1);

}


function goTop() {
		
	location = "#top";

}  

function gateway(passEF){	
	var MyWindow2=window.open(jBaseServer+'/web/proc/gateproc.asp?pef='+passEF+'&pcal=0&pclid='+jCLID+'&pbypass='+jByPass,'MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=100,height=100,screenX=20,screenY=20,top=20,left=20');
}

// Calendar Support

function eventTab(pv,pm,pd,py){
	
	if (jEventPTR==0){
		window.location=jBaseServer+"/web/page.asp?pPGID="+jPGID+"&pv="+pv+"&pm="+pm+"&pd="+pd+"&py="+py+"&pbypass="+jByPass+"#cal";
	}
	else{
		window.location=jBaseServer+"/web/eventsPTR.asp?pCLID="+jCLID+"&pef="+jEF+"&pv="+pv+"&pm="+pm+"&pd="+pd+"&py="+py+"&pbypass="+jByPass;
	}

}

function showEventCAL(pid,pm,pd,py){
	
	var MyWindow2=window.open(jBaseServer+'/web/proc/eventLOOKUP.asp?pid='+pid+'&pm='+pm+'&pd='+pd+'&py='+py+'&pef='+jEF+'&pcal=1&pclid='+jCLID+'&pbypass='+jByPass,'MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=100,height=100,screenX=20,screenY=20,top=20,left=20');
	
}

function eventsPTR(pv,pm,pd,py){
	
	if ( !is.ns4){
		var MyWindow2=window.open(jBaseServer+'/web/eventsPTR.asp?pclid='+jCLID+'&pef='+jEF+'&pv='+pv+'&pm='+pm+'&pd='+pd+'&py='+py+"&pbypass="+jByPass,'PTRWindow','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,screenX=0,screenY=0,top=0,left=0');
	}
	else{
		var MyWindow2=window.open(jBaseServer+'/web/eventsPTR.asp?pclid='+jCLID+'&pef='+jEF+'&pv='+pv+'&pm='+pm+'&pd='+pd+'&py='+py+'&pbypass='+jByPass,'PTRWindow','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,screenX=0,screenY=0,top=0,left=0');
	}
}


function remindMe(pid,pm,pd,py){

	var winRemind = window.open(jBaseServer+"/web/remindme.asp?pCLID="+jCLID+"&pEF="+jEF+"&pid="+pid+"&pm="+pm+"&pd="+pd+"&py="+py,"_blank","width=475,height=325");
	
}

function submitReminder(){
	
	if (isFilled(document.remind.pRemindEmail.value)==false){
		if (jEF==1){
			alert("SVP indiquez votre adresse électronique.");
		}
		else{
			alert("You must enter your email address.");
		}
		document.remind.pRemindEmail.focus();
		return false;
	}
	
	if (isEmail(document.remind.pRemindEmail.value)==false){
		if (jEF==1){
			alert("SVP indiquez votre adresse électronique.");
		}
		else{
			alert("You must enter a valid email address.");
		}
		document.remind.pRemindEmail.focus();
		return false;
	}
	
	document.remind.submit();

}

function submitEvent(){

	if ( (document.RT.pEVEndTimeHour.selectedIndex!=0) || (document.RT.pEVEndTimeMinute.selectedIndex!=0) || (document.RT.pEVEndTimeAMPM.selectedIndex!=0) ){
		if (document.RT.pEVEndTimeHour.selectedIndex==0){
			if (jEF==1){
				alert("SVP corrigez l'HEURE dans "+String.fromCharCode(34)+"Heure fin"+String.fromCharCode(34)+".");
			}
			else{
				alert("Please Correct "+String.fromCharCode(34)+"End Time"+String.fromCharCode(34)+" HOUR of your event.");
			}
			return false;
		}
		if (document.RT.pEVEndTimeMinute.selectedIndex==0){
			if (jEF==1){
				alert("SVP corrigez les MINUTES dans "+String.fromCharCode(34)+"Heure fin"+String.fromCharCode(34)+".");
			}
			else{
				alert("Please Correct "+String.fromCharCode(34)+"End Time"+String.fromCharCode(34)+" MINUTES of your event.");
			}
			return false;
		}
		if (document.RT.pEVEndTimeAMPM.selectedIndex==0){
			if (jEF==1){
				alert("SVP corrigez AM/PM dans "+String.fromCharCode(34)+"Heure fin"+String.fromCharCode(34)+".");
			}
			else{
				alert("Please Correct "+String.fromCharCode(34)+"End Time"+String.fromCharCode(34)+" AM/PM of your event.");
			}
			return false;
		}
	}
	
	if (isFilled(document.RT.pEVHead.value) == false) 
	{
		if (jEF==1){
			alert("SVP entrez l'entête pour l'événement.");
		}
		else{
			alert("Please enter heading of event.");
		}
		
		document.RT.pEVHead.focus();
		return false;
	}
	
	if (isFilled(document.RT.pEVHost.value) == false) 
	{
		if (jEF==1){
			alert("SVP entrez l'hôte de l'événement.");
		}
		else{
			alert("Please enter host of the event.");
		}
		document.RT.pEVHost.focus();
		return false;
	}
	
	if (isFilled(document.RT.pEVDesc.value) == false) 
	{
		if (jEF==1){
			alert("SVP entrez une description sommaire de l'événement.");
		}
		else{
			alert("Please enter short description of the event.");
		}
		document.RT.pEVDesc.focus();
		return false;
	}

	if (isFilled(document.RT.pEVEmail.value) == false) 
	{
		if (jEF==1){
			alert("SVP indiquez votre adresse électronique.");
		}
		else{
			alert("Please enter your email.");
		}
		document.RT.pEVEmail.focus();
		return false;
	}

	if (isEmail(document.RT.pEVEmail.value)==false)
	{
		if (jEF==1){
			alert("SVP indiquez votre adresse électronique.");
		}
		else{
			alert("Please double check your email that you have entered.");
		}
		document.RT.pEVEmail.focus();
		return false;
	}
	
	
	if (isFilled(document.RT.pEVHttp.value) == true){
		
		var chkurl=document.RT.pEVHttp.value;

		var http=chkurl.substring(0,7)

		if (!(http.toUpperCase()=="HTTP://")){
			document.RT.pEVHttp.value="http://"+document.RT.pEVHttp.value;
		}
		
	}

	document.RT.action=jBaseServer+"/web/proc/ep.asp"
	document.RT.submit();


	
}


// BULLETIN SUPPORT
function showSignup(pT){
	
	if (isFilled(document.RT.pEmail.value)==false){
		if (jEF==1){
			alert("SVP indiquez votre adresse électronique.");
		}
		else{
			alert("You must enter your email address.");
		}
		document.RT.pEmail.focus();
		return false;
	}
	
	if (isEmail(document.RT.pEmail.value)==false){
		if (jEF==1){
			alert("SVP indiquez votre adresse électronique.");
		}
		else{
			alert("You must enter a valid email address.");
		}
		document.RT.pEmail.focus();
		return false;
	}

	if (pT==1){
		//SUBSCRIBING
		var winproc=window.open(jBaseServer+'/web/proc/sp.asp?pclid='+jCLID+'&pef='+jEF+'&pemail='+escape(document.RT.pEmail.value)+'&pt=1&pgo='+escape(jBaseServer+"/web/subscribe.asp?"),'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=100,height=100,screenX=20,screenY=20,top=20,left=20');
	}
	else{
		//UN-SUBSCRIBING
		var winproc=window.open(jBaseServer+'/web/proc/sp.asp?pclid='+jCLID+'&pef='+jEF+'&pemail='+escape(document.RT.pEmail.value)+'&pr='+escape(document.RT.pReason.value)+'&pt=3&pgo='+jBaseServer+'/web/subscribe.asp?','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=100,height=100,screenX=20,screenY=20,top=20,left=20');
	}

}

function submitBulletin(){

	if (isFilled(document.RT.pBUHead.value) == false) 
	{
		if (jEF==1){
			alert("SVP entrez l'entête du communiqué.");
		}
		else{
			alert("Please enter heading of bulletin.");
		}
		document.RT.pBUHead.focus();
		return false;
	}
		
	if (isFilled(document.RT.pBUScroller.value) == false) 
	{
		if (jEF==1){
			alert("SVP entrez une description sommaire du communiqué.");
		}
		else{
			alert("Please enter short description of the bulletin.");
		}
		document.RT.pBUScroller.focus();
		return false;
	}

	if (isFilled(document.RT.pBUName.value) == false) 
	{
		if (jEF==1){
			alert("Information manquante: Votre nom.");
		}
		else{
			alert("Please enter your name.");
		}
		document.RT.pBUName.focus();
		return false;
	}

	if (isFilled(document.RT.pBUEmail.value) == false) 
	{
		if (jEF==1){
			alert("SVP indiquez votre adresse électronique.");
		}
		else{
			alert("Please enter your email.");
		}
		document.RT.pBUEmail.focus();
		return false;
	}

	if (isEmail(document.RT.pBUEmail.value)==false)
	{
		if (jEF==1){
			alert("SVP indiquez votre adresse électronique.");
		}
		else{
			alert("Please double check your email that you have entered.");
		}
		document.RT.pBUEmail.focus();
		return false;
	}
	
	
	if (isFilled(document.RT.pBUHttp.value) == true){
		
		var chkurl=document.RT.pBUHttp.value;

		var http=chkurl.substring(0,7)

		if (!(http.toUpperCase()=="HTTP://")){
			document.RT.pBUHttp.value="http://"+document.RT.pBUHttp.value;
		}
		
	}

	document.RT.action=jBaseServer+"/web/proc/bp.asp"
	document.RT.submit();
	
}

function submitClassified(){

	if (isFilled(document.RT.pCFHead.value) == false) 
	{
		if (jEF==1){
			alert("SVP entrez l'entête de votre annonce.");
		}
		else{
			alert("Please enter heading of your classified ad.");
		}
		document.RT.pCFHead.focus();
		return false;
	}
		
	if (isFilled(document.RT.pCFDesc.value) == false) 
	{
		if (jEF==1){
			alert("SVP entrez une description sommaire de votre annonce.");
		}
		else{
			alert("Please enter short description of your classified ad.");
		}
		document.RT.pCFDesc.focus();
		return false;
	}

	if (isFilled(document.RT.pCFHttp.value) == true){
		
		var chkurl=document.RT.pCFHttp.value;

		var http=chkurl.substring(0,7)

		if (!(http.toUpperCase()=="HTTP://")){
			document.RT.pCFHttp.value="http://"+document.RT.pCFHttp.value;
		}
		
	}

	if (isFilled(document.RT.pCFName.value) == false) 
	{
		if (jEF==1){
			alert("Information manquante: Votre nom.");
		}
		else{
			alert("Please enter your name.");
		}
		document.RT.pCFName.focus();
		return false;
	}

	if (isFilled(document.RT.pCFEmail.value) == false) 
	{
		if (jEF==1){
			alert("SVP indiquez votre adresse électronique.");
		}
		else{
			alert("Please enter your email.");
		}
		document.RT.pCFEmail.focus();
		return false;
	}

	if (isEmail(document.RT.pCFEmail.value)==false)
	{
		if (jEF==1){
			alert("SVP indiquez votre adresse électronique.");
		}
		else{
			alert("Please double check your email that you have entered.");
		}
		document.RT.pCFEmail.focus();
		return false;
	}
	
	

	document.RT.action=jBaseServer+"/web/proc/cfp.asp"
	document.RT.submit();
	
}

function removeClassified(){

	document.RT.action=jBaseServer+"/web/proc/cfp_remove.asp"
	document.RT.submit();
	

}

function submitFeedback(){

	if (isFilled(document.RT.pFBName.value) == false) 
	{
		if (jEF==1){
			alert("Information manquante: Votre nom.");
		}
		else{
			alert("Please enter your name.");
		}
		document.RT.pFBName.focus();
		return false;
	}
	
	if (isFilled(document.RT.pFBEmail.value) == false) 
	{
		if (jEF==1){
			alert("SVP indiquez votre adresse électronique.");
		}
		else{
			alert("Please enter your email.");
		}
		document.RT.pFBEmail.focus();
		return false;
	}

	if (isEmail(document.RT.pFBEmail.value)==false)
	{
		if (jEF==1){
			alert("SVP indiquez votre adresse électronique.");
		}
		else{
			alert("Please double check your email that you have entered.");
		}
		document.RT.pFBEmail.focus();
		return false;
	}
	
	if (isFilled(document.RT.pFBSubject.value) == false) 
	{
		if (jEF==1){
			alert("Information manquante: Sujet.");
		}
		else{
			alert("Please enter subject of message.");
		}
		document.RT.pFBSubject.focus();
		return false;
	}

	if (isFilled(document.RT.pFBMessage.value) == false) 
	{
		if (jEF==1){
			alert("Information manquante: Message.");
		}
		else{
			alert("Please enter your message.");
		}
		document.RT.pFBMessage.focus();
		return false;
	}
	
	document.RT.action=jBaseServer+"/web/proc/fp.asp"
	document.RT.submit();
	
}

function popSEND(ptitle,pmsg,plink){

	var winSend = window.open(jBaseServer+"/web/sendtoafriend.asp?pCLID="+jCLID+"&pEF="+jEF+"&ptitle="+escape(ptitle)+"&plink="+escape(plink),"_blank","width=475,height=400");
	
}