function CheckthatItemWasSelected(NumItems) {var Flag=0; var alertText; for(i=0; i"; document.getElementById('ImgSwap').innerHTML = "

Adding Item to Wish List...

"; var UPC12digit = document.getElementById('UPC12digit').value; var Qty = document.getElementById('Qty').value; var url = SITE+'NewCart/CartHandler.php?action=AddToWishList&sku='+UPC12digit+'&Qty='+Qty; //alert(url); script = document.createElement( 'script' ); script.src = url; document.getElementsByTagName( 'head' )[0].appendChild( script ); } else { alert('Please Choose a size.'); } } function LoadupProdVeiw() { var v1; var PID; var qs = new Querystring(); if(v1= qs.get("ProdRev")) { PID= qs.get("PID"); //alert(PID); GetReviewForm(PID); } } function GetReviewForm(PID) { var url =SITE+'phpscripts/ProductHandler.php?action=AddReviewForm&PID='+PID; //alert(url); script = document.createElement( 'script' ); script.src = url; document.getElementsByTagName( 'head' )[0].appendChild( script ); } function HideReviewForm() { document.getElementById('ProductReviewsForm').innerHTML = ''; } function AddReview() { Rating=document.ReviewForm.Rating.value; SizeFit=document.ReviewForm.SizeFit.value; if(document.ReviewForm.Rating[0].checked) Rating='5'; if(document.ReviewForm.Rating[1].checked) Rating='4'; if(document.ReviewForm.Rating[2].checked) Rating='3'; if(document.ReviewForm.Rating[3].checked) Rating='2'; if(document.ReviewForm.Rating[4].checked) Rating='1'; Comment=document.ReviewForm.Comment.value; PID=document.ReviewForm.PID.value; document.getElementById('ProductReviewsForm').innerHTML = "Posting for Review ...."; var url =SECURESITE+'phpscripts/ProductHandler.php?action=AddReview&Rating='+Rating+'&Comment='+Comment+'&SizeFit='+SizeFit+'&PID='+PID; //alert(url); script = document.createElement( 'script' ); script.src = url; document.getElementsByTagName( 'head' )[0].appendChild( script ); } function CheckCaptaCode(MyForm) {ErrorMessage=''; Code=MyForm.CodeBox.value; if(Code == '') { //document.getElementById('Code').className = 'redTD'; ErrorMessage+='Please enter code MYWISH into code box.\n'; } if(ErrorMessage == '') { MyForm.submit(); } else { alert(ErrorMessage); } } function CheckPassForm(MyForm) { ErrorMessage=''; NewPass=MyForm.NewPass.value; if(NewPass == '') { //document.getElementById('Code').className = 'redTD'; ErrorMessage+='Please enter new password.\n'; } ConfirmPass=MyForm.ConfirmPass.value; if(ConfirmPass != NewPass) { //document.getElementById('Code').className = 'redTD'; ErrorMessage+='Passwords do not match.\n'; } CustID=MyForm.CustID.value; NewPass=MyForm.NewPass.value; if(ErrorMessage == '') { document.getElementById('SignUpArea').innerHTML = "Loading Please wait..."; var url =SECURESITE+'CustAdmin/index.php?action=StartAccountFromOrder&CustID='+CustID+'&NewPass='+NewPass; //alert(url); script = document.createElement( 'script' ); script.src = url; document.getElementsByTagName( 'head' )[0].appendChild( script ); } else { alert(ErrorMessage); } } function SizeSearch(Gender,Size) { document.getElementById('InvSizes').innerHTML = "Getting All available Sizes..."; var url =SITE+'phpscripts/AvailableSizeSearch.php?action=go&Gender='+Gender+'&Size='+Size; script = document.createElement( 'script' ); script.src = url; document.getElementsByTagName( 'head' )[0].appendChild( script ); } function CheckContactUsForm(MyForm) { ErrorMessage=''; Code=MyForm.Code.value; if(Code != '123emu') { //document.getElementById('Code').className = 'redTD'; ErrorMessage+='Please Enter Correct Security Code\n'; } if(ErrorMessage == '') { MyForm.submit(); } else { alert(ErrorMessage); } } function GetOtherView(ImgLoc) { $NewImage=''; document.getElementById('ImgSwap').innerHTML = $NewImage; } function GetCalledColor(str) { str = str ? str : location.search; var query = str.charAt(0) == '?' ? str.substring(1) : str; var args = new Object(); if (query) { var fields = query.split('&'); for (var f = 0; f < fields.length; f++) { var field = fields[f].split('='); args[unescape(field[0].replace(/\+/g, ' '))] = unescape(field[1].replace(/\+/g, ' ')); } } for (var arg in args) { //alert(arg + '=' + args[arg]); } //ColorCode=sand&Style=classic tall&ColorDesc=Sand&Gender=women document.getElementById('ColorName').innerHTML = args['ColorDesc']; ProdN=args['Gender']+' '+args['Style']+' '+args['ColorDesc']; document.getElementById('ProductName').innerHTML = ProdN; //alert(Style); GetAvailableSizes(args['ColorCode'],args['Style'],args['Gender']); script = document.createElement( 'script' ); ScriptCall=SITE+'phpscripts/ProductHandler.php?action=GetNewColorPic&ColorCode='+args['ColorCode']+'&Style='+args['Style']+'&Gender='+args['Gender']; //alert(ScriptCall); script.src = ScriptCall; document.getElementsByTagName( 'head' )[0].appendChild( script ); } function LoadStyleDropDown() { var url =SECURESITE+'phpscripts/ProductHandler.php?action=LoadStyleDropDown'; script = document.createElement( 'script' ); script.src = url; document.getElementsByTagName( 'head' )[0].appendChild( script ); } function TrakIt(ThisSrc) { script = document.createElement( 'script' ); script.src = SECURESITE+'phpscripts/pagetraker.php?Page='+ThisSrc; document.getElementsByTagName( 'head' )[0].appendChild( script ); } function SwapColor(ColorCode,Style,ColorDesc,Gender,Cat,Price) { document.getElementById('ColorName').innerHTML = ColorDesc; ProdN=Gender+' '+Style+' '+ColorDesc; document.getElementById('ProductName').innerHTML = ProdN; document.getElementById('PriceSpot').innerHTML = Price; //alert(Style); GetAvailableSizes(ColorCode,Style,Gender); script = document.createElement( 'script' ); script.src = SITE+'phpscripts/ProductHandler.php?action=GetNewColorPic&ColorCode='+ColorCode+'&Style='+Style+'&Gender='+Gender+'&SubCat='+Cat; document.getElementsByTagName( 'head' )[0].appendChild( script ); } function selectOption(num) { alert(num); selObj.options[num].selected=true; } function setIt(sel,val) { for( var i=0, limit=sel.options.length; i < limit; ++i ) { //alert(sel.options[i].value); if( sel.options[i].value==val ) sel.options[i].selected=true; } } function SwapView(ColorCode,Style,Gender,View,ColorDesc) { document.getElementById('ColorName').innerHTML = ColorDesc; ProdN=Gender+' '+Style+' '+ColorDesc; document.getElementById('ProductName').innerHTML = ProdN; GetAvailableSizes(ColorCode,Style,Gender); document.getElementById('ImgSwap').innerHTML = "Getting New Image..."; script = document.createElement( 'script' ); script.src = SITE+'phpscripts/ProductHandler.php?action=GetNewViewPic&ColorCode='+ColorCode+'&Style='+Style+'&Gender='+Gender+'&View='+View; document.getElementsByTagName( 'head' )[0].appendChild( script ); } function SwapColorHandBag(ColorCode,Style,ColorDesc,SKU) { document.getElementById('ColorName').innerHTML = ColorDesc; //alert(ColorDesc); //alert(SKU); document.getElementById('SelectedSize').innerHTML = ''; script = document.createElement( 'script' ); script.src = SITE+'phpscripts/ProductHandler.php?action=GetNewColorPic&ColorCode='+ColorCode+'&Style='+Style; document.getElementsByTagName( 'head' )[0].appendChild( script ); } function GetSelectedColorName(ColorDesc) { document.getElementById('ColorName').innerHTML = ColorDesc; } function GetColorMini(ColorCode,Style,ColorDescription,Gender) { //alert(DivColorName); script = document.createElement( 'script' ); script.src = SITE+'phpscripts/ProductHandler.php?action=GetNewColorPicMini&ColorCode='+ColorCode+'&Style='+Style+'&Gender='+Gender+'&DivID='+Style; document.getElementsByTagName( 'head' )[0].appendChild( script ); } function GetColorNameMini(Style,ColorDescription) { //DivColorName='Color'+Style; //document.getElementById(DivColorName).innerHTML = ColorDescription; } function GetAvailableSizes(ColorCode,Style,Gender) { //alert(ColorCode); document.getElementById('AvailableSizes').innerHTML = 'Please wait, loading available sizes.....'; script = document.createElement( 'script' ); PageCall=SITE+'phpscripts/ProductHandler.php?action=AvailableSizes&ColorCode='+ColorCode+'&Style='+Style+'&Gender='+Gender; //alert(PageCall); script.src = PageCall; document.getElementsByTagName( 'head' )[0].appendChild( script ); } function LoadMiniCart() { script = document.createElement( 'script' ); script.src = SECURESITE+'NewCart/CartHandler.php?action=LoadMiniCart'; document.getElementsByTagName( 'head' )[0].appendChild( script ); } function SelectSize(SKU) { //alert(SKU); if(SKU != '') {document.getElementById('SelectedSize').innerHTML = '';} } var whosChanged = null; function ChangeColor(el) { el.style.backgroundColor = "#FE3000"; el.style.color = "#000000"; if (whosChanged != null) { whosChanged.style.backgroundColor = "" whosChanged.style.color = "" } whosChanged = el; } function AddToCart(Action) { //alert(UPC12digit); if(document.getElementById('UPC12digit')) { addToBasket(1); //document.getElementById('superminicart').innerHTML = ""; //document.getElementById('ImgSwap').innerHTML = "

Adding to cart...

"; var UPC12digit = document.getElementById('UPC12digit').value; var Qty = document.getElementById('Qty').value; //alert(UPC12digit); script = document.createElement( 'script' ); script.src = SECURESITE+'NewCart/CartHandler.php?action='+Action+'&sku='+UPC12digit+'&Qty='+Qty; document.getElementsByTagName( 'head' )[0].appendChild( script ); return false; } else { alert('Please Choose a size.'); } } function TrakPage() { Link=SECURESITE+'pagetraker.php?Page='+window.location+'&Referer='; script = document.createElement( 'script' ); script.src =Link; document.getElementsByTagName( 'head' )[0].appendChild( script ); } //TrakPage(); var popWin = null // use this when referring to pop-up window var winCount = 0 var winName = "popWin" function openPopWin(winURL, winWidth, winHeight, winFeatures, winLeft, winTop){ var d_winLeft = 20 // default, pixels from screen left to window left var d_winTop = 20 // default, pixels from screen top to window top winName = "popWin" + winCount++ //unique name for each pop-up window closePopWin() // close any previously opened pop-up window if (openPopWin.arguments.length >= 4) // any additional features? winFeatures = "," + winFeatures+','; else winFeatures = "" //window.open('jex5.htm','mywindow','width=400,height=200,left=0,top=100,screenX=0,screenY=100') if (openPopWin.arguments.length == 6) // location specified winFeatures += 'width='+winWidth+',height='+ winHeight+',left='+ winLeft+',top='+ winTop; else winFeatures += 'width='+winWidth+',height='+ winHeight+',left='+d_winLeft+',top='+ d_winTop //alert(winFeatures); popWin = window.open(winURL, winName, winFeatures) } function closePopWin(){ // 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(popWin != null) if(!popWin.closed) popWin.close() } function getLocation(winWidth, winHeight, winLeft, winTop){ return "" } /////////////////////////////////////////////////////////////////////////////////////// ////////////Functions below for splitting out query string /////////////////////////////////////////////////////////////////////////// function Querystring(qs) { // optionally pass a querystring to parse this.params = {}; if (qs == null) qs = location.search.substring(1, location.search.length); if (qs.length == 0) return; // Turn back to // See: http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1 qs = qs.replace(/\+/g, ' '); var args = qs.split('&'); // parse out name/value pairs separated via & // split out each name=value pair for (var i = 0; i < args.length; i++) { var pair = args[i].split('='); var name = decodeURIComponent(pair[0]); var value = (pair.length==2) ? decodeURIComponent(pair[1]) : name; this.params[name] = value; } } Querystring.prototype.get = function(key, default_) { var value = this.params[key]; return (value != null) ? value : default_; } Querystring.prototype.contains = function(key) { var value = this.params[key]; return (value != null); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /* Simple AJAX Code-Kit (SACK) */ /* ©2005 Gregory Wild-Smith */ /* www.twilightuniverse.com */ /* Software licenced under a modified X11 licence, see documentation or authors website for more details */ function sack(file){ this.AjaxFailedAlert = "Your browser does not support the enhanced functionality of this website, and therefore you will have an experience that differs from the intended one.\n"; this.requestFile = file; this.method = "POST"; this.URLString = ""; this.encodeURIString = true; this.execute = false; this.onLoading = function() { }; this.onLoaded = function() { }; this.onInteractive = function() { }; this.onCompletion = function() { }; this.createAJAX = function() { try { this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (err) { this.xmlhttp = null; } } if(!this.xmlhttp && typeof XMLHttpRequest != "undefined") this.xmlhttp = new XMLHttpRequest(); if (!this.xmlhttp){ this.failed = true; } }; this.setVar = function(name, value){ if (this.URLString.length < 3){ this.URLString = name + "=" + value; } else { this.URLString += "&" + name + "=" + value; } } this.encVar = function(name, value){ var varString = encodeURIComponent(name) + "=" + encodeURIComponent(value); return varString; } this.encodeURLString = function(string){ varArray = string.split('&'); for (i = 0; i < varArray.length; i++){ urlVars = varArray[i].split('='); if (urlVars[0].indexOf('amp;') != -1){ urlVars[0] = urlVars[0].substring(4); } varArray[i] = this.encVar(urlVars[0],urlVars[1]); } return varArray.join('&'); } this.runResponse = function(){ eval(this.response); } this.runAJAX = function(urlstring){ this.responseStatus = new Array(2); if(this.failed && this.AjaxFailedAlert){ alert(this.AjaxFailedAlert); } else { if (urlstring){ if (this.URLString.length){ this.URLString = this.URLString + "&" + urlstring; } else { this.URLString = urlstring; } } if (this.encodeURIString){ var timeval = new Date().getTime(); this.URLString = this.encodeURLString(this.URLString); this.setVar("rndval", timeval); } if (this.element) { this.elementObj = document.getElementById(this.element); } if (this.xmlhttp) { var self = this; if (this.method == "GET") { var totalurlstring = this.requestFile + "?" + this.URLString; this.xmlhttp.open(this.method, totalurlstring, true); } else { this.xmlhttp.open(this.method, this.requestFile, true); } if (this.method == "POST"){ try { this.xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded') } catch (e) {} } this.xmlhttp.send(this.URLString); this.xmlhttp.onreadystatechange = function() { switch (self.xmlhttp.readyState){ case 1: self.onLoading(); break; case 2: self.onLoaded(); break; case 3: self.onInteractive(); break; case 4: self.response = self.xmlhttp.responseText; self.responseXML = self.xmlhttp.responseXML; self.responseStatus[0] = self.xmlhttp.status; self.responseStatus[1] = self.xmlhttp.statusText; self.onCompletion(); if(self.execute){ self.runResponse(); } if (self.elementObj) { var elemNodeName = self.elementObj.nodeName; elemNodeName.toLowerCase(); if (elemNodeName == "input" || elemNodeName == "select" || elemNodeName == "option" || elemNodeName == "textarea"){ self.elementObj.value = self.response; } else { self.elementObj.innerHTML = self.response; } } self.URLString = ""; break; } }; } } }; this.createAJAX(); } //Fly to Basket /************************************************************************************************************ (C) www.dhtmlgoodies.com, March 2006 This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website. Terms of use: You are free to use this script as long as the copyright message is kept intact. However, you may not redistribute, sell or repost it without our permission. Version: 1.0 Released March. 3rd 2006 Thank you! www.dhtmlgoodies.com Alf Magne Kalleland ************************************************************************************************************/ var flyingSpeed = 9; var url_addProductToBasket = 'addProduct.php'; var url_removeProductFromBasket = 'removeProduct.php'; var txt_totalPrice = 'Total: '; var shopping_cart_div = false; var flyingDiv = false; var currentProductDiv = false; var shopping_cart_x = false; var shopping_cart_y = false; var slide_xFactor = false; var slide_yFactor = false; var diffX = false; var diffY = false; var currentXPos = false; var currentYPos = false; var ajaxObjects = new Array(); function shoppingCart_getTopPos(inputObj) { var returnValue = inputObj.offsetTop; while((inputObj = inputObj.offsetParent) != null){ if(inputObj.tagName!='HTML')returnValue += inputObj.offsetTop; } return returnValue; } function shoppingCart_getLeftPos(inputObj) { var returnValue = inputObj.offsetLeft; while((inputObj = inputObj.offsetParent) != null){ if(inputObj.tagName!='HTML')returnValue += inputObj.offsetLeft; } return returnValue; } function addToBasket(productId) { if(!shopping_cart_div)shopping_cart_div = document.getElementById('shopping_cart'); if(!flyingDiv){ flyingDiv = document.createElement('DIV'); flyingDiv.style.position = 'absolute'; document.body.appendChild(flyingDiv); } shopping_cart_x = shoppingCart_getLeftPos(shopping_cart_div); shopping_cart_y = shoppingCart_getTopPos(shopping_cart_div); currentProductDiv = document.getElementById('slidingProduct' + productId); currentXPos = shoppingCart_getLeftPos(currentProductDiv); currentYPos = shoppingCart_getTopPos(currentProductDiv); diffX = shopping_cart_x - currentXPos; diffY = shopping_cart_y - currentYPos; var shoppingContentCopy = currentProductDiv.cloneNode(true); shoppingContentCopy.id=''; flyingDiv.innerHTML = ''; flyingDiv.style.left = currentXPos + 'px'; flyingDiv.style.top = currentYPos + 'px'; flyingDiv.appendChild(shoppingContentCopy); flyingDiv.style.display='block'; flyingDiv.style.width = currentProductDiv.offsetWidth + 'px'; flyToBasket(productId); } function flyToBasket(productId) { var maxDiff = Math.max(Math.abs(diffX),Math.abs(diffY)); var moveX = (diffX / maxDiff) * flyingSpeed;; var moveY = (diffY / maxDiff) * flyingSpeed; currentXPos = currentXPos + moveX; currentYPos = currentYPos + moveY; flyingDiv.style.left = Math.round(currentXPos) + 'px'; flyingDiv.style.top = Math.round(currentYPos) + 'px'; if(moveX>0 && currentXPos > shopping_cart_x){ flyingDiv.style.display='none'; } if(moveX<0 && currentXPos < shopping_cart_x){ flyingDiv.style.display='none'; } if(flyingDiv.style.display=='block')setTimeout('flyToBasket("' + productId + '")',10); } ParseQuerystring(); function ParseQuerystring(qs) { //alert('inside Parse'); // Using this function to grab query string and check for Commission Junction variable ref=cj this.params = {}; if (qs == null) qs = location.search.substring(1, location.search.length); if (qs.length == 0) return; qs = qs.replace(/\+/g, ' '); var args = qs.split('&'); // parse out name/value pairs separated via & // split out each name=value pair for (var i = 0; i < args.length; i++) { var pair = args[i].split('='); var name = decodeURIComponent(pair[0]); var value = (pair.length==2) ? decodeURIComponent(pair[1]) : name; this.params[name] = value; if(name == 'ref' || name == 'PID') { //Post Cookie //alert('posting cj cookie'); var exdate=new Date(); var c_name='ref'; var expiredays=45; exdate.setDate(exdate.getDate()+expiredays); //Setting cookie for CJ to expire in 45 days document.cookie=c_name+ "=" +escape(value)+ ((expiredays==null) ? "" : ";expires="+exdate.toGMTString()); //Track where visitor came from script = document.createElement( 'script' ); Loc='https://www.emubootsdirect.com/phpscripts/pagetraker2.php?Page='+window.location+'&Referer='+document.referrer; //alert(Loc); script.src = Loc; document.getElementsByTagName( 'head' )[0].appendChild( script ); } } }