



	function login(){
	if (new String(window.location) != new String(window.parent.location)){
		h = screen.availHeight - 20
		w = screen.availWidth - 10
		window.open("assoc.php","_top","width="+w+",height="+h+",resizable,titlebar,left=0,top=0")
	}
	}

// Distributer Check Feild Sg

function bookLocator(){
  var loc = 0;
  var codeString = new RegExp("\\d{5}", "g"); 
    if ((document.locator.postkey.value=="")||document.locator.postkey.value.search(codeString) == -1){
     loc=1;
     window.alert("Attention, tout code postal comprend 5 chiffres\t\t\n");
		 document.locator.postkey.focus();
     return;
  }
  if (loc==0){
   document.locator.submit();
     }
  return;
}


 // Search Check Feild Sg
 
function replaceChars(entry) {
out = "'"; // replace this
add = ""; // with this
temp = "" + entry; // temporary holder

while (temp.indexOf(out)>-1) {
pos= temp.indexOf(out);
temp = "" + (temp.substring(0, pos) + add + 
temp.substring((pos + out.length), temp.length));
}
 resche(temp);
}
 
 
 








function resche(doit){
  var resc =0;
		  var sesrString =  /^[_0-9 a-z-éçèâàäùüîïûùµêëöô]*[_0-9 a-z-éçèâàäùüîïûùµêëöô]$/i;
      if ((doit=="")|| doit.search(sesrString) == -1){
     resc=1;
     window.alert("Pour rechercher...\n* il faut au moins un critère de recherche\n* pas de guillants\t\t\n");
		 document.resch.searchakey.focus();
     return;
  }
  if (resc==0){
   document.resch.submit();
     }
  return;
}



var isNav, isIE, intervalID3, intervalID4,flashTimer
var coll = ""
var styleObj = ""

if (parseInt(navigator.appVersion) >= 4){
if (navigator.appName =="Netscape") {
	  isNav= true
	}else{
	  isIE= true
	  coll = "all."
	  styleObj = ".style"
	}
}





<!--******** open Print windows *************** -->
<!--******** open Print windows *************** -->
<!--******** open Print windows *************** -->
<!--******** open Print windows *************** -->
<!--******** open Print windows *************** -->
<!--******** open Print windows *************** -->













function ctrlPrint(){
  print();
}


<!-- Catalog Extra Pages -->


var extraPag = null    // use this when referring to pop-up window
var winCont = 0
var imag = "extraPag"

function openIn(pImageName,imWidth,imHeight,clos,fromwhere) {
	imag = "extraPag" + winCont++ //unique name for each pop-up window
  closeextraPag() 
// specify window parameters document.body.clientHeight window.innerWidth

//var wit=380;
//var hit=550;
//var extraPag = window.open("", "imag","width="+wit+",height="+hit+",status,scrollbars,resizable,left=0,top=0");


//	function expandingWindow(website) {
var heightspeed = 2; // vertical scrolling speed (higher = slower)
var widthspeed = 7;  // horizontal scrolling speed (higher = slower)
var leftdist = 10;    // distance to left edge of window
var topdist = 10;     // distance to top edge of window
var prbutheight= 60; // print button height
	
if (document.all) {
//for full screen opening use...
//var winwidth = window.screen.availWidth - leftdist;
//var winheight = window.screen.availHeight - topdist;

//Screen size
var windowidth = window.screen.availWidth - leftdist;
var windoheight = window.screen.availHeight - topdist;

// for the window open to size of image use...
var winwidth = imWidth;
var winheight = imHeight;

// if the image is bigtger than the screen window make the window the width of the screen
if (imWidth >= windowidth ){
var winwidth = windowidth;
}
//For making the window pop open in center 
//w=winwidth +10;
//h=winheight+30;
//t=(screen.height-h)/2;
//l=(screen.width-w)/2;




//var sizer = window.open("","","left=" + leftdist + ",top=" + topdist + ",width=1,height=1,scrollbars=yes");
var extraPag = window.open("", "imag","left=" + leftdist + ",top=" + topdist + ",width=1,height=1,scrollbars=yes");


	 extraPag.document.write('<html><head><title>MINERVOIS</title>');
	 extraPag.document.write('<style type="text/css"><!-- ');
	 extraPag.document.write('body{scrollbar-base-color: #FFFFFF; scrollbar-shadow-color: #dddddd; scrollbar-highlight-color: #eeeeee; scrollbar-3dlight-color: #aaaaaa;scrollbar-darkshadow-color: #aaaaaa; scrollbar-track-color: #dddddd;  scrollbar-arrow-color: #aaaaaa;background-color:#FFFFFF; } ');
	 extraPag.document.write(' //--></style>');
	 extraPag.document.write('</head>');	
   extraPag.document.write('<BODY BGCOLOR=#FFFFFF TEXT=#FFFFCC LINK=#33CCFF VLINK=#FF6666>');
   extraPag.document.write('<center>');
   extraPag.document.write('<img src="'+fromwhere+'vas/catelog/gallery/larp/' + pImageName + '" alt="' + pImageName + '"  galleryimg="no" border="1"><p>');
   extraPag.document.write('</center>');
	 extraPag.document.write('<table cellpadding="0" cellspacing="0" width="100%" border="0"><tr><td valign="top">');
   extraPag.document.write('&nbsp;<a href="#" onClick="self.close()"><img src=\"'+fromwhere+'images/imPageClose'+clos+'.jpg\" name=\"but1\" border=\"0\"></a>&nbsp;'); 
   extraPag.document.write('<a href=\"#\" onClick=\"javascript:window.print()\"><img src=\"'+fromwhere+'images/imPageprint'+clos+'.jpg\" name=\"but2\" border=\"0\"></a>\n'); 
	 extraPag.document.write('</td><td valign=top align=right>');
	 extraPag.document.write('<img src=\"'+fromwhere+'images/imPagelogo021.jpg\" name=\"but0\" border=\"0\">');
   extraPag.document.write('<p></font></td></tr></table></body></html>');
   extraPag.document.close();	

		//if (navigator.appName.substring(0,8) == "Netscape")  		extraPag.focus();
extraPag.focus();

for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed) {
extraPag.resizeTo("1", sizeheight);
}
for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed) {
extraPag.resizeTo(sizewidth, sizeheight);
}
}
extraPag.focus();
		


}



function closeextraPag(){    // close pop-up window if it is open 

  if (navigator.appName != "Microsoft Internet Explorer" 
      || parseInt(navigator.appVersion) >=4) //do not close if early IE
    if(extraPag != null) if(!extraPag.closed) extraPag.close() 
  }



	
	
	
	
	
	
	
	var imgaWin = null    // use this when referring to pop-up window
var imgaCont = 0
var imgaNome = "imgaWin"

		function big_photo( pFileName, pTitle,pCaption) {

// specify window parameters document.body.clientHeight window.innerWidth

var wi=document.body.clientWidth;
var hi=document.body.clientHeight;
var wit=screen.availWidth;
var hit=screen.availHeight -60;

		imgaNome = "imgaWin" + imgaCont++ //unique name for each pop-up window
  closeimgaWin() 
	
  imgaWin = window.open( "", "imgaNome","width=640,height=480,status,scrollbars,resizable,left=0,top=0");



// 	
  imgaWin.document.write('<html><head><title>' + pTitle + '</title></head>');	
  imgaWin.document.write('<BODY BGCOLOR=#000000 TEXT=#FFFFCC LINK=#33CCFF VLINK=#FF6666>');
  imgaWin.document.write('<center>');
  imgaWin.document.write('<font size=+2 face="arial,helvetica"  color=#fffff><b>' + pCaption + '</b></font><br><br>');
  imgaWin.document.write('<img src="' + pFileName + '">');
  imgaWin.document.write('<p></font></body></html>');
  imgaWin.document.close();	
	// If we are on NetScape, we can bring the window to the front
	if (navigator.appName.substring(0,8) == "Netscape") 
imgaWin.focus();
}



function closeimgaWin(){    // close pop-up window if it is open 
  if (navigator.appName != "Microsoft Internet Explorer" 
      || parseInt(navigator.appVersion) >=4) //do not close if early IE
    if(imgaWin != null) if(!imgaWin.closed) imgaWin.close() 
  }

	
	
	
	
	
	
	
	
	// If not Internet Explorer
	
	<!-- Catalog Extra Pages -->


var extra = null    // use this when referring to pop-up window
var winCon = 0
var imagt = "extra"

function openPictWind(pImageNam,imWidt,imHeigh,clo,fromwhere) {

// specify window parameters document.body.clientHeight window.innerWidth

var wite=imWidt;
var hite=imHeigh;

	imag = "extra" + winCon++ //unique name for each pop-up window
  closeextra() 

var extra = window.open("", "imagt","width="+wite+",height="+hite+",status,scrollbars,resizable,left=0,top=0");
   extra.document.write('<html><head><title>MINERVOIS</title>');
	 extra.document.write('<style type="text/css"><!-- ');
	 extra.document.write('body{scrollbar-base-color: #ffffff; scrollbar-shadow-color: #dddddd; scrollbar-highlight-color: #eeeeee; scrollbar-3dlight-color: #aaaaaa;scrollbar-darkshadow-color: #aaaaaa; scrollbar-track-color: #dddddd;  scrollbar-arrow-color: #aaaaaa;background-color:#ffffff; } ');
	 extra.document.write(' //--></style>');
	 extra.document.write('</head>');	
   extra.document.write('<BODY BGCOLOR=#000000 TEXT=#FFFFCC LINK=#33CCFF VLINK=#FF6666>');
   extra.document.write('<center>');
   extra.document.write('<img src="'+fromwhere+'vas/catelog/gallery/larp/' + pImageNam + '" alt="' + pImageNam + '" galleryimg="no" border=\"0\"><p>');
   extra.document.write('');
	 extra.document.write('<table cellpadding="0" cellspacing="0" width="90%" border="0"><tr><td valign="top">');
   extra.document.write('&nbsp;<a href="#" onClick="self.close()"><img src=\"'+fromwhere+'images/imPageClose'+clo+'.jpg\" name=\"but5\" border=\"0\"></a>&nbsp;'); 
   extra.document.write('<a href=\"javascript:window.print()\"><img src=\"'+fromwhere+'images/imPagePrint'+clo+'.jpg\" name=\"but6\" border=\"0\"></a>\n'); 
	 extra.document.write('</td><td valign=top align=right>');
	 extra.document.write('<img src=\"'+fromwhere+'images/imPagelogo021.jpg\" border=\"0\">');
   extra.document.write('<p></font></td></tr></table></body></html>');
   extra.document.close();	
		if (navigator.appName.substring(0,8) == "Netscape")  
		extra.focus();
}



function closeextra(){    // close pop-up window if it is open 
  if (navigator.appName != "Microsoft Internet Explorer" 
      || parseInt(navigator.appVersion) >=4) //do not close if early IE
    if(extra != null) if(!extra.closed) extra.close() 
  }

	
	
		
	function eegoPage(newURL) {

   	if (newURL != "") {
   	
  		if (newURL == "-" ) {
			resetMenu();
		} else {
  
// send page to designated URL
   			document.location.href = newURL;
   		}
   	}
}





function PrintCommande(print,windowComman,typeofComman,idrow,bge){
  if(! window.focus)
    return;

  
  var printComman=window.open("vas/catelog/inprintCommande.php?chprint="+ typeofComman +"&oreder="+ idrow +"&badge="+ bge +"",windowComman,'height=580,width=620,dependent=yes,scrollbars=yes');
  printComman.focus();

 
}
//** Commerce Print
function openCommerce(print,windowCommerce,typeofCommerce,idcode,url,shop){
  if(! window.focus)
    return;
  var printCommerce=window.open(""+ url +"vas/commerce/comPrint.php?chprint="+ typeofCommerce +"&shopid="+ shop +"",windowCommerce,'height=520,width=720,dependent=yes,scrollbars=yes');
  printCommerce.focus();
}

function openCommerceEvents(print,windowCommerce,typeofCommerce,idcode,url,shop){
  if(! window.focus)
    return;
  var printCommerce=window.open("../vas/commerce/comPrint.php?chprint="+ typeofCommerce +"&shopid="+ shop +"",windowCommerce,'height=360,width=400,dependent=yes,scrollbars=yes');
  printCommerce.focus();
}


//**Events Print
function popEvents(print,windowEvent,theCh,theEventsNo,url,shop){
  if(! window.focus)
    return;
  var printEvent=window.open("http://www.leminervois.com/vas/calendar/vig_eventsPop.php?chprint="+ theCh +"&theEventsNo="+ theEventsNo +"&shopid="+ shop +"",windowEvent,'height=600,width=760,dependent=yes,scrollbars=yes');
  printEvent.focus();
}




function openPrintPageCatAdmin(print,windowPrint,typeofPrint,idcode){
  if(! window.focus)
    return;
    var printWin=window.open("vas/catelog/inprintcat.php?chprint="+ typeofPrint +"&rowid="+ idcode +"",windowPrint,'height=580,width=650,dependent=yes,scrollbars=yes');
  printWin.focus();
}



function openPrintPageCat(print,windowPrint,typeofPrint,idcode,url){
  if(! window.focus)
    return;

  
  var printWin=window.open(""+ url +"vas/catelog/inprintcat.php?chprint="+ typeofPrint +"&rowid="+ idcode +"",windowPrint,'left=10,top=20,height=580,width=670,dependent=yes,scrollbars=yes');
  printWin.focus();

 
}








function openPrintWine(print,windowWine,itemcode,idWine,url,shopid,largeimage,lango){
  if(! window.focus)
    return;
  var printWine=window.open(""+ url +"vas/vinsDetails/inprintVins.php?v="+ itemcode +"&shopid="+ shopid +"&vinid="+ idWine +"&largepic="+ largeimage +"&lango="+ lango +"",windowWine,'left=10,top=20,height=580,width=620,dependent=yes,scrollbars=yes');
  printWine.focus();
}



function openPrintMenu(print,windowMenu,itemcode,idMenu,url,shopid,largeimage,lango){
  if(! window.focus)
    return;

  
  var printMenu=window.open(""+ url +"vas/restaurantDetails/inprintlacarte.php?v="+ itemcode +"&shopid="+ shopid +"&menuid="+ idMenu +"&largepic="+ largeimage +"&lango="+ lango +"",windowMenu,'left=10,top=20,height=580,width=620,dependent=yes,scrollbars=yes');
  printMenu.focus();

 
}

function openPortTarif(print,windowFrais,itemcode,idWine,url,shopid,largeimage,lango){
  if(! window.focus)
    return;
  //alert(itemcode);
	
	var printPort=window.open(""+ url +"vas/vinsDetails/inprintVins.php?v="+ itemcode +"&shopid="+ shopid +"&vinid="+ idWine +"&largepic="+ largeimage +"&lango="+ lango +"",windowFrais,'left=10,top=20,height=580,width=620,dependent=yes,scrollbars=yes');
  printPort.focus();
}





function openPrintPageCatListAdmin(print,windowPrint,typeofPrint,cat,page,mark,onoff,nextpage,url){
  if(! window.focus)
    return;

  
  var printWin=window.open(""+ url +"vas/catelog/inprintcat.php?chprint="+ typeofPrint +"&kategory="+ cat +"&catpageno="+ page +"&brande="+ mark+"&searchakey="+ keys +"&onswitch="+ onoff +"&debut="+ nextpage +"",windowPrint,'height=560,width=620,dependent=yes,scrollbars=yes');
  printWin.focus();

 
}


function openPrintPageCatList(print,windowPrint,typeofPrint,cat,page,mark,keys,onoff,nextpage,url,pag){
  if(! window.focus)
    return;

  
  var printWin=window.open(""+ url +"vas/catelog/inprintcat.php?chprint="+ typeofPrint +"&kategory="+ cat +"&catpageno="+ page +"&brande="+ mark+"&searchakey="+ keys +"&onswitch="+ onoff +"&debut="+ nextpage +"&page="+ pag +"",windowPrint,'height=560,width=620,dependent=yes,scrollbars=yes');
  printWin.focus();

 
}



function openPrintPage(print,windowPrint,typeofPrint,weekset,topi,url){
  if(! window.focus)
    return;

  
  var printWin=window.open(""+ url +"main/inprint.php?chprint="+ typeofPrint +"&weektoset="+ weekset +"&topic="+ topi +"",windowPrint,'height=580,width=620,dependent=yes,scrollbars=yes');
  printWin.focus();
 // print.target=windowPrint;
}

function openPrintPageadmin(print,windowPrint,typeofPrint,weekset,topi){
  if(! window.focus)
    return;
  
  var printWin=window.open("../../main/inprint.php?chprint="+ typeofPrint +"&weektoset="+ weekset +"&topic="+ topi +"",windowPrint,'height=580,width=620,dependent=yes,scrollbars=yes');
  printWin.focus();
 // print.target=windowPrint;
}

function openPrintPageclient(print,windowPrint,typeofPrint,weekset,topi){
  if(! window.focus)
    return;
  
  var printWin=window.open("../../main/inprint.php?chprint="+ typeofPrint +"&weektoset="+ weekset +"&topic="+ topi +"",windowPrint,'height=580,width=620,dependent=yes,scrollbars=yes');
  printWin.focus();
 // print.target=windowPrint;
}






<!--******************** join email form check* *********************-->



function joinemail(){


  var em = 0;
  var emailString =  /^([_0-9a-z\.-])+@([_0-9a-z\.-])+[a-z]{2,3}$/i;
  var textString =  /^[_0-9 a-z-âéçè'àùûêëöô]*[_0-9 a-z-âéçè'àùûêëöô]$/i;
  var passString = /^[_0-9a-z]*[_0-9a-z]$/i;
 

  if (document.emaildiff.prenom.value.search(textString) == -1){
     em=1;
     window.alert("Oh !!! et vous oubliez votre prenom?!?!\t\t\n");
     document.emaildiff.prenom.focus();
     return;
  }



  if (document.emaildiff.nom.value.search(textString) == -1){
     em=1;
     window.alert("Oh !!! et vous oubliez votre nom?!?!\t\t\n");
     document.emaildiff.nom.focus();
     return;
  }
    if (document.emaildiff.email.value.search(emailString) == -1){
     em=1;
     window.alert("Pouvez-vous vérifier que votre adresse courriel soit correcte? merci\t\t\n");
     document.emaildiff.email.focus();
     return;
  }

   
  if (em==0){


   document.emaildiff.submit();
   
  }
  return;
}











function FormatTextShort(command, option){
	
  	frames.shortMessage.document.execCommand(command, true, option);
  	frames.shortMessage.focus();
}

//Function to add image
function AddImageShort(){	
	imagePath = prompt('Enter the web address of the image', 'http://');				
	
	if ((imagePath != null) && (imagePath != "")){					
		frames.shortMessage.document.execCommand('InsertImage', false, imagePath);
  		frames.shortMessage.focus();
	}
	frames.shortMessage.focus();			
}






//Function to format text in the text box


function FormatText(command, option){
	
  	frames.message.document.execCommand(command, true, option);
  	frames.message.focus();
}

//Function to add image
function AddImage(){	
	imagePath = prompt('Enter the web address of the image', 'http://');				
	
	if ((imagePath != null) && (imagePath != "")){					
		frames.message.document.execCommand('InsertImage', false, imagePath);
  		frames.message.focus();
	}
	frames.message.focus();			
}


//Function to clear form
function ResetForm(){

	if (window.confirm('Annular l\'e-mail?')){
	 	frames.message.document.body.innerHTML = ''; 
	 	return true;
	 } 
	 return false;		
}




//Function to open pop up window
function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}























/**********************************************************************************   
ScrollText 
*   Copyright (C) 2001 Thomas Brattli
*   This script was released at DHTMLCentral.com
*   Visit for more great scripts!
*   This may be used and changed freely as long as this msg is intact!
*   We will also appreciate any links you could give us.
*
*   Made by Thomas Brattli
*
*   Script date: 09/23/2001 (keep this date to check versions) 
*********************************************************************************/
function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=(navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=lib_bwcheck()
/*****************

You set the width and height of the divs inside the style tag, you only have to
change the divScrollTextCont, Remember to set the clip the same as the width and height.
You can remove the divUp and divDown layers if you want. 
This script should also work if you make the divScrollTextCont position:relative.
Then you should be able to place this inside a table or something. Just remember
that Netscape crash very easily with relative positioned divs and tables.

Updated with a fix for error if moving over layer before pageload.

****************/


//If you want it to move faster you can set this lower, it's the timeout:
var speed = 30

//Sets variables to keep track of what's happening
var loop, timer

//Object constructor
function makeObj(obj,nest){
    nest=(!nest) ? "":'document.'+nest+'.'
	this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
  this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
	this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
	this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
	this.up=goUp;this.down=goDown;
	this.moveIt=moveIt; this.x=0; this.y=0;
    this.obj = obj + "Object"
    eval(this.obj + "=this")
    return this
}

// A unit of measure that will be added when setting the position of a layer.
var px = bw.ns4||window.opera?"":"px";

function moveIt(x,y){
	this.x = x
	this.y = y
	this.css.left = this.x+px
	this.css.top = this.y+px
}
function scroll_top(){
	
}

//Makes the object go up
function goDown(move){
	if (this.y>-this.scrollHeight+oCont.clipHeight){
		this.moveIt(0,this.y-move)
			if (loop) setTimeout(this.obj+".down("+move+")",speed)
	}
}
//Makes the object go down
function goUp(move){
	if (this.y<0){
		this.moveIt(0,this.y-move)
		if (loop) setTimeout(this.obj+".up("+move+")",speed)
	}
}

//Calls the scrolling functions. Also checks whether the page is loaded or not.
function scroll(speed){
	if (scrolltextLoaded){
		loop = true;
		if (speed>0) oScroll.down(speed)
		else oScroll.up(speed)
	}
}

//Stops the scrolling (called on mouseout)
function noScroll(){
	loop = false
	if (timer) clearTimeout(timer)
}
//Makes the object
var scrolltextLoaded = false
function scrolltextInit(){
	oCont = new makeObj('divScrollTextCont')
	oScroll = new makeObj('divText','divScrollTextCont')
	oScroll.moveIt(0,0)
	oCont.css.visibility = "visible"
	scrolltextLoaded = true
}
//Call the init on page load if the browser is ok...
function yesimages(){
if (bw.bw) onload = scrolltextInit
}
/***************
Multiple Scripts
If you have two or more scripts that use the onload event, probably only one will run (the last one).
Here is a solution for starting multiple scripts onload:
   1. Delete or comment out all the onload assignments, onload=initScroll and things like that.
   2. Put the onload assignments in the body tag like in this example, note that they must have braces ().
   Example: <body onload="initScroll(); initTooltips(); initMenu();">
**************/




