// XXXXXXXXXXXXXXXXXXX DATABASE URL XXXXXXXXXXXXXXXXXXX function dburl() { // return location.pathname.split('.nsf')[0] + '.nsf' ; return 'http://www.moulindelacoudre.com/moulin/catmoulin.nsf' ; } // XXXXXXXXXXXXXXXXXX AFFICHE LA FICHE PRODUIT XXXXXXXXXXXXXXXXXX function disp(id) { var url = dburl() ; url = url + '/viewwebprdts/' + id ; //document.write('Recherche en cours...') ; // if ( nwd == '1' ) { newWindow(url,300,500,1,1,0,0,0,0,0,id) ; // } else { // window.location = url; // } } // XXXXXXXXXXXXXXXXXX AFFICHE UNE INFO DANS LA BARRE D'ETAT XXXXXXXXXXXXXXXXXX function display(stuff) { window.status = stuff; return true; } // XXXXXXXXXXXXXXXXXX CHANGE LE STYLE DE L'ELEMENT SELECTIONNE XXXXXXXXXXXXXXXXXX // pour les lignes de tableau function swapCL(src,clName) { src.className = clName; } //XXXXXXXXXXXXXXXXXX OUVRE UNE PAGE A PARTIR D'UNE LISTE DEROULANTE XXXXXXXXXXXXXXX function urlMenu(that,cible) { theURL = that.options[that.selectedIndex].value; if (theURL) { if (cible=='tabledetail') { top.tabledetail.location.href = dburl() + '/' + theURL; } else { window.location = dburl() + '/' + theURL; } } } // XXXXXXXXXXXXXXXXXXX OUVERTURE DE FENETRES XXXXXXXXXXXXXXXXXXX function newWindow(url, height, width,scroll,resiz,menu,tool,status,location,dir,nameW) { if (nameW==""){ nameW='noname' } if (url.substring(0,4)!="http"){ url = dburl() + '/' + url } if (navigator.appVersion.indexOf('4') != -1) { // Vars for centering the new window on Version 4 Browsers xTop = screen.width/2 - (width/2); yTop = screen.height/2 - (height/2); window.open(url, nameW, 'height='+height+',width='+width+',scrollbars='+scroll+',resizable='+resiz+',menubar='+menu+',toolbar='+tool+',status='+status+',location='+location+',directories='+dir+',left=' + xTop + ',top=' + yTop + ''); } else { window.open(url, nameW, 'height='+height+',width='+width+',scrollbars='+scroll+',resizable='+resiz+',menubar='+menu+',toolbar='+tool+',status='+status+',location='+location+',directories='+dir+',left=150,top=200'); } } // XXXXXXXXXXXXXXXXXXX REDIM AUTO DES FRAMES XXXXXXXXXXXXXXXXXXX function resizeframe(id){ if (!window.opera && !document.mimeType && document.all && document.getElementById){ parent.document.getElementById(id).style.height=this.document.body.offsetHeight+"px"; } else if(document.getElementById) { parent.document.getElementById(id).style.height=this.document.body.scrollHeight+"px" } } // XXXXXXXXXXXXXXXXXXXXXX RECHERCHE CATALOGUE XXXXXXXXXX function searchcat ( s ) { var regExp1 = /\bfield\b/; var regExp2 = /[(,),<,>,\[,\]]/; var str = s.value; if ( str == "" ){ alert("Please be sure to enter something to search for."); s.focus(); } else { if ( typeof regExp1.source != 'undefined' ) //supports regular expression testing if ( regExp1.test( str ) || regExp2.test( str ) ){ var alrt = "Please note that you can not include:"; alrt += "\n\nThe reserved word 'field'\nthe characters [, ], (, ), < or >"; alrt += "\n\nin your search query!\n\nIf you are confident that you know"; alrt += "\nwhat you are doing, then you can\nmanually produce the URL required." s.focus(); return alert( alrt ); } var url = dburl(); window.location = url + '/viewsearch?searchView&Query=' + escape( str ) + '&start=1&count=10&searchorder=4'; } }