function ajaxthis(url, postdata, changearray) { //get with ajax the info for that sec var xmlHttpReq = false; var self = this; // Mozilla/Safari if (window.XMLHttpRequest) { self.xmlHttpReq = new XMLHttpRequest(); } // IE else if (window.ActiveXObject) { self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP"); } self.xmlHttpReq.open('POST', url, true); self.xmlHttpReq.onreadystatechange = function() { if (self.xmlHttpReq.readyState == 4) { var myArray = self.xmlHttpReq.responseText.split('``'); for (var j=0; j"; if(ie4) {showContentObj=document.all.divid;} if(ns6) {showContentObj=document.getElementById(divid);} if(ie4||ns6) { if(showContentObj.innerHTML!=movie) { showContentObj.innerHTML=movie; } else { showContentObj.innerHTML=""; } } } function showContentgall(file, divid) { var movie = ""; if(ie4) {showContentObj=document.all.divid;} if(ns6) {showContentObj=document.getElementById(divid);} if(ie4||ns6) { if(showContentObj.innerHTML!=movie) { showContentObj.innerHTML=movie; } else { showContentObj.innerHTML=""; } } } function showContentimg(file, divid) { var img = ""; if(ie4) {showContentObj=document.all.divid;} if(ns6) {showContentObj=document.getElementById(divid);} if(ie4||ns6) { if(showContentObj.innerHTML!=img) { showContentObj.innerHTML=img; } else { showContentObj.innerHTML=""; } } } function showfeatimg(file, divid) { var img = ""; if(ie4) {showContentObj=document.all.divid;} if(ns6) {showContentObj=document.getElementById(divid);} if(ie4||ns6) { if(showContentObj.innerHTML!=img) { showContentObj.innerHTML=img; } else { showContentObj.innerHTML=""; } } } function showviewimg(file, divid) { var img = ""; if(ie4) {showContentObj=document.all.divid;} if(ns6) {showContentObj=document.getElementById(divid);} if(ie4||ns6) { if(showContentObj.innerHTML!=img) { showContentObj.innerHTML=img; } else { showContentObj.innerHTML=""; } } } function changetxt(txt, divid) { if(ie4) {showContentObj=document.all.divid;} if(ns6) {showContentObj=document.getElementById(divid);} if(ie4||ns6) { if(showContentObj.innerHTML!=txt) { showContentObj.innerHTML=txt; } else { showContentObj.innerHTML=""; } } } function checkdrop(formname,item) { if (document.forms[formname].id.value == 'no') { alert("Please choose a " + item + " size before adding to your cart."); return false; } } function remove(id) { document.cart.action = "store.php"; document.cart.sub.value="y"; document.cart.remid.value=id; document.cart.submit(); } function targetopener(mylink, closeme, closeonly) { if (!(window.focus && window.opener)) return true; window.opener.focus(); if (!closeonly) window.opener.location.href=mylink.href; if (closeme) window.close(); return false; } function goon(formid) { document.forms[formid].submit(); } function checkterms(formid) { if (document.forms[formid].agree.checked == false) { document.getElementById('termserror').style.display = 'block'; return false; } else { return true; } } function enable() { if(document.formres.shipadd.checked == false) { document.formres.x_ship_to_first_name.disabled = false; document.formres.x_ship_to_last_name.disabled = false; document.formres.x_ship_to_address.disabled = false; document.formres.x_ship_to_city.disabled = false; document.formres.x_ship_to_state.disabled = false; document.formres.x_ship_to_zip.disabled = false; document.formres.x_ship_to_country.disabled = false; } else { document.formres.x_ship_to_first_name.disabled = true; document.formres.x_ship_to_last_name.disabled = true; document.formres.x_ship_to_address.disabled = true; document.formres.x_ship_to_city.disabled = true; document.formres.x_ship_to_state.disabled = true; document.formres.x_ship_to_zip.disabled = true; document.formres.x_ship_to_country.disabled = true; } } function xmlhttpPost(id) { ajaxthis('/getimg.php', '&id=' + id, ['featimg', 'featside', 'feattxt']); } function getgal1(id) { ajaxthis('/getgal.php', '&id=' + id, ['mainimggall', 'changetxt']); } function getgal2(id) { ajaxthis('/getvid.php', '&id=' + id, ['mainimggall', 'changetxt']); } function getElementsByClass(searchClass,node,tag) { var classElements = new Array(); if ( node == null ) node = document; if ( tag == null ) tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp('(^|\\s)'+searchClass+'(\\s|$)'); for (i = 0, j = 0; i < elsLen; i++) { if ( pattern.test(els[i].className) ) { classElements[j] = els[i]; j++; } } return classElements; } function hideallsubs() { var arrayOfDivs = getElementsByClass('subcatsh'); var howMany = arrayOfDivs.length; for (var i=0; i < howMany; i++) { var thisDiv = arrayOfDivs[i]; thisDiv.style.display = "none"; swapImage('document.home','document.home','images/home.gif'); swapImage('document.prod','document.prod','images/prod.gif'); swapImage('document.jour','document.jour','images/jour.gif'); swapImage('document.about','document.about','images/about.gif'); } document.getElementById('sub_home').style.display = "none"; } function removeon() { var arrayOfDivs = getElementsByClass('on'); var howMany = arrayOfDivs.length; //var thisDiv = arrayOfDivs[1];//home //thisDiv.className = "";//home for (var i=0; i < howMany; i++) { var thisDiv = arrayOfDivs[i]; thisDiv.className = "cats"; } document.getElementById('home').className = "placeholder"; } function isMouseLeaveOrEnter(e, handler) { var reltg = e.relatedTarget ? e.relatedTarget : e.type == 'mouseout' ? e.toElement : e.fromElement; while (reltg && reltg != handler) reltg = reltg.parentNode; return (reltg != handler); } function defaultsub(id) { //alert(id); //console.log("fired"); pausecomp(500); hideallsubs(); removeon(); if(id == '1') { document.getElementById('sub_home').style.display = "block"; swapImage('document.home','document.home','images/home_.gif'); document.getElementById('home').className = "on"; } if(id == '2') { document.getElementById('sub_prods').style.display = "block"; swapImage('document.prod','document.prod','images/prod_.gif'); document.getElementById('prod').className = "on cats"; } if(id == '3') { document.getElementById('sub_jour').style.display = "block"; swapImage('document.jour','document.jour','images/jour_.gif'); document.getElementById('jour').className = "on cats"; } if(id == '4') { document.getElementById('sub_about').style.display = "block"; swapImage('document.about','document.about','images/about_.gif'); document.getElementById('about').className = "on cats"; } } function clearform(which) { if (which.value=="YOUR EMAIL") { which.value=''; which.style.color='#000'; } } function searchtxt(which) { if (which.value=="") { which.value='YOUR EMAIL'; which.style.color='#999'; } } function makecolor(which) { if(which.value=="") { which.value="YOUR EMAIL"; } if (which.value=="YOUR EMAIL") { which.style.color='#999'; } else { which.style.color='#000'; } } function unsetside() { //unset all sidebar ids var arrayOfDivs = getElementsByClass('sections'); var howMany = arrayOfDivs.length; for (var i=0; i < howMany; i++) { var thisDiv = arrayOfDivs[i]; RemoveClassName(thisDiv, 'onsec'); } } function setside(section, tent) { unsetside(); var thisSel = document.getElementById('sec' + section); AddClassName(thisSel, 'onsec', 0); } /* function gotosection(section, tent, photo) { //hilight setside(section, tent); //get with ajax the info for that sec ajaxthis('getsec.php', 'ajax=y&id=' + tent + '&sec=' + section + "&photonumber=" + photo, ['tents_price', 'tents_bullets', 'tents_text', 'tentmain', 'tents_buy']); } */ function gotosection_new(section, tent, photo) { //hilight setside(section, tent); //get with ajax the info for that sec ajaxthis('getsec2009.php', 'ajax=y&id=' + tent + '&sec=' + section + "&photonumber=" + photo, ['tents_price', 'tents_bullets', 'tents_text', 'tentmain', 'tents_buy', 'bannerspace']); } // ---------------------------------------------------------------------------- // HasClassName // // Description : returns boolean indicating whether the object has the class name // built with the understanding that there may be multiple classes // // Arguments: // objElement - element to manipulate // strClass - class name to add // function HasClassName(objElement, strClass) { // if there is a class if ( objElement.className ) { // the classes are just a space separated list, so first get the list var arrList = objElement.className.split(' '); // get uppercase class for comparison purposes var strClassUpper = strClass.toUpperCase(); // find all instances and remove them for ( var i = 0; i < arrList.length; i++ ) { // if class found if ( arrList[i].toUpperCase() == strClassUpper ) { // we found it return true; } } } // if we got here then the class name is not there return false; } // // HasClassName // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // AddClassName // // Description : adds a class to the class attribute of a DOM element // built with the understanding that there may be multiple classes // // Arguments: // objElement - element to manipulate // strClass - class name to add // function AddClassName(objElement, strClass, blnMayAlreadyExist) { // if there is a class if ( objElement.className ) { // the classes are just a space separated list, so first get the list var arrList = objElement.className.split(' '); // if the new class name may already exist in list if ( blnMayAlreadyExist ) { // get uppercase class for comparison purposes var strClassUpper = strClass.toUpperCase(); // find all instances and remove them for ( var i = 0; i < arrList.length; i++ ) { // if class found if ( arrList[i].toUpperCase() == strClassUpper ) { // remove array item arrList.splice(i, 1); // decrement loop counter as we have adjusted the array's contents i--; } } } // add the new class to end of list arrList[arrList.length] = strClass; // add the new class to beginning of list //arrList.splice(0, 0, strClass); // assign modified class name attribute objElement.className = arrList.join(' '); } // if there was no class else { // assign modified class name attribute objElement.className = strClass; } } // // AddClassName // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // RemoveClassName // // Description : removes a class from the class attribute of a DOM element // built with the understanding that there may be multiple classes // // Arguments: // objElement - element to manipulate // strClass - class name to remove // function RemoveClassName(objElement, strClass) { // if there is a class if ( objElement.className ) { // the classes are just a space separated list, so first get the list var arrList = objElement.className.split(' '); // get uppercase class for comparison purposes var strClassUpper = strClass.toUpperCase(); // find all instances and remove them for ( var i = 0; i < arrList.length; i++ ) { // if class found if ( arrList[i].toUpperCase() == strClassUpper ) { // remove array item arrList.splice(i, 1); // decrement loop counter as we have adjusted the array's contents i--; } } // assign modified class name attribute objElement.className = arrList.join(' '); } // if there was no class // there is nothing to remove } // // RemoveClassName // ---------------------------------------------------------------------------- /* function changeimg(imgid, thumbid, mainormore) { //get with ajax the info for that sec var xmlHttpReq = false; var self = this; // Mozilla/Safari if (window.XMLHttpRequest) { self.xmlHttpReq = new XMLHttpRequest(); } // IE else if (window.ActiveXObject) { self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP"); } self.xmlHttpReq.open('GET', 'getimg2.php?img=' + mainormore + '&id=' + imgid, true); self.xmlHttpReq.onreadystatechange = function() { if (self.xmlHttpReq.readyState == 4) { var myArray = self.xmlHttpReq.responseText.split('``'); document.getElementById('mainimg2').innerHTML = myArray[0]; //change borders //remove all class as onthumb var arrayOfDivs = getElementsByClass('mainthumb'); var howMany = arrayOfDivs.length; for (var i=0; i < howMany; i++) { var thisDiv = arrayOfDivs[i]; RemoveClassName(thisDiv, 'onthumb'); } //add class var thisSel = document.getElementById(thumbid); AddClassName(thisSel, 'onthumb', 0); //document.getElementById('tents_bullets').innerHTML = myArray[1]; if(document.recalc) document.recalc();//for ie only from ie7 } } self.xmlHttpReq.send('getimg2.php?img=' + mainormore + '&id=' + imgid); } */ function changeimg_new(imgid, thumbid, mainormore) { //get with ajax the info for that sec var xmlHttpReq = false; var self = this; // Mozilla/Safari if (window.XMLHttpRequest) { self.xmlHttpReq = new XMLHttpRequest(); } // IE else if (window.ActiveXObject) { self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP"); } self.xmlHttpReq.open('GET', 'getimg2009.php?img=' + mainormore + '&id=' + imgid, true); self.xmlHttpReq.onreadystatechange = function() { if (self.xmlHttpReq.readyState == 4) { var myArray = self.xmlHttpReq.responseText.split('``'); document.getElementById('mainimg2').innerHTML = myArray[0]; //change borders //remove all class as onthumb var arrayOfDivs = getElementsByClass('mainthumb'); var howMany = arrayOfDivs.length; for (var i=0; i < howMany; i++) { var thisDiv = arrayOfDivs[i]; RemoveClassName(thisDiv, 'onthumb'); } //add class var thisSel = document.getElementById(thumbid); AddClassName(thisSel, 'onthumb', 0); //document.getElementById('tents_bullets').innerHTML = myArray[1]; if(document.recalc) document.recalc();//for ie only from ie7 } } self.xmlHttpReq.send('getimg2009.php?img=' + mainormore + '&id=' + imgid); } /* function changevid(imgid, thumbid, mainormore) { //get with ajax the info for that sec var xmlHttpReq = false; var self = this; // Mozilla/Safari if (window.XMLHttpRequest) { self.xmlHttpReq = new XMLHttpRequest(); } // IE else if (window.ActiveXObject) { self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP"); } self.xmlHttpReq.open('GET', 'getimg3.php?img=' + mainormore + '&id=' + imgid, true); self.xmlHttpReq.onreadystatechange = function() { if (self.xmlHttpReq.readyState == 4) { var myArray = self.xmlHttpReq.responseText.split('``'); document.getElementById('mainimg2').innerHTML = myArray[0]; //change borders //remove all class as onthumb var arrayOfDivs = getElementsByClass('mainthumb'); var howMany = arrayOfDivs.length; for (var i=0; i < howMany; i++) { var thisDiv = arrayOfDivs[i]; RemoveClassName(thisDiv, 'onthumb'); } //add class var thisSel = document.getElementById(thumbid); AddClassName(thisSel, 'onthumb', 0); //document.getElementById('tents_bullets').innerHTML = myArray[1]; if(document.recalc) document.recalc();//for ie only from ie7 } } self.xmlHttpReq.send('getimg3.php?img=' + mainormore + '&id=' + imgid); } */ function changevid_new(imgid, thumbid, mainormore) { //get with ajax the info for that sec var xmlHttpReq = false; var self = this; // Mozilla/Safari if (window.XMLHttpRequest) { self.xmlHttpReq = new XMLHttpRequest(); } // IE else if (window.ActiveXObject) { self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP"); } self.xmlHttpReq.open('GET', 'getimg3_new.php?img=' + mainormore + '&id=' + imgid, true); self.xmlHttpReq.onreadystatechange = function() { if (self.xmlHttpReq.readyState == 4) { var myArray = self.xmlHttpReq.responseText.split('``'); document.getElementById('mainimg2').innerHTML = myArray[0]; //change borders //remove all class as onthumb var arrayOfDivs = getElementsByClass('mainthumb'); var howMany = arrayOfDivs.length; for (var i=0; i < howMany; i++) { var thisDiv = arrayOfDivs[i]; RemoveClassName(thisDiv, 'onthumb'); } //add class var thisSel = document.getElementById(thumbid); AddClassName(thisSel, 'onthumb', 0); //document.getElementById('tents_bullets').innerHTML = myArray[1]; if(document.recalc) document.recalc();//for ie only from ie7 } } self.xmlHttpReq.send('getimg3_new.php?img=' + mainormore + '&id=' + imgid); } function expandSELECT(sel) { } function contractSELECT(sel) { } function targetopener(mylink, closeme, closeonly) { if (! (window.focus && window.opener))return true; window.opener.focus(); if (! closeonly)window.opener.location.href=mylink.href; if (closeme)window.close(); return false; } function pausecomp(millis) { var date = new Date(); var curDate = null; do { curDate = new Date(); } while(curDate-date < millis); } var timeout = 500; var closetimer = 0; var ddmenuitem = 0; // open hidden layer function mopen(id, textid, bgid) { // cancel close timer mcancelclosetime(); // close old layer if(ddmenuitem) ddmenuitem.style.visibility = 'hidden'; // get new layer and show it if(document.getElementById(id)) { ddmenuitem = document.getElementById(id); ddmenuitem.style.visibility = 'visible'; } thish = document.getElementById(textid).offsetHeight; //alert(thish); document.getElementById(bgid).style.height = thish + 'px'; } // close showed layer function mclose() { if(ddmenuitem) ddmenuitem.style.visibility = 'hidden'; } // go close timer function mclosetime() { closetimer = window.setTimeout(mclose, timeout); } // cancel close timer function mcancelclosetime() { if(closetimer) { window.clearTimeout(closetimer); closetimer = null; } } // close layer when click-out document.onclick = mclose;