function selectLanguage(valjare) { var myindex = valjare.options.selectedIndex; if (valjare.options[myindex].value != "0") { if (window != top) { var strLang = ""; var newLang = "SWE"; if(strLang == "SWE") { newLang = "ENG"; } else { newLang = "SWE"; } var eStrURL = "" + parent.expo.location; var eNewURL = eStrURL.replace(strLang,newLang); location = valjare.options[myindex].value; var bStrURL = "" + parent.basket.location; var bNewURL = bStrURL.replace(strLang,newLang); parent.basket.location = bNewURL; } else { location = valjare.options[myindex].value; } } } function selectCommon(valjare) { var myindex = valjare.options.selectedIndex; if (valjare.options[myindex].value != "0") { location = valjare.options[myindex].value; } } function removeItemFromCart(sID,itemType) { var myindex = document.cart.cartSelect.options.selectedIndex; if (document.cart.cartSelect.options[myindex].value != "0") { location = "/mindaImageBase/global/process/removeFromCart.asp?action=removeItem&sID=" + sID + "&itemType=" + itemType + "&languageVer=&itemID=" + document.cart.cartSelect.options[myindex].value; } } function addItemToCart(sID) { var myindex = document.cart.cartSelect.options.selectedIndex; if (document.cart.cartSelect.options[myindex].value != "0") { location = "/mindaImageBase/global/process/addCartItem.asp?sID=" + sID + "&cartView=products&languageVer=&itemID=" + document.cart.cartSelect.options[myindex].value; } } function viewItemDetails(sID,itemType) { if(itemType == "products") { searchDoc = "prodSearchResult.asp"; searchWordArea = "searchProdTxt"; } else { searchDoc = "searchResult.asp"; searchWordArea = "searchTxt"; } var myindex = document.cart.cartSelect.options.selectedIndex; if (document.cart.cartSelect.options[myindex].value != "0") { parent.expo.location = "/mindaImageBase/global/" + searchDoc + "?viewType=searchResult&" + searchWordArea + "=" + document.cart.cartSelect.options[myindex].value + "&searchType=1&sID=" + sID + "&languageVer="; } } function openWindow(page,namn,w,h) { if(h == 0) { h = screen.height - 50; toppen = 0 } else { toppen = (screen.height - h) / 2; } sidan = (screen.width - w) / 2; window.openPopWindow = window.open(page, namn, "width=" + w + ",height=" + h + ",scrollbars=yes ,screenX=100,left=" + sidan + ",screenY=" + sidan + ",top=" + toppen); } function adjustCartFrameView(minimize) { parentURL = new String( parent.location ); // get url cs = "&cartSize=" + minimize; // recreate cartSize param for replacement langStr = "&languageVer="; start = parentURL.indexOf( langStr ); oldLang = parentURL.substring( start, start + langStr.length + 3 ); lang = langStr + ""; parentURL = parentURL.replace( oldLang, lang ); if( parentURL.indexOf( "&cartSize=" ) < 0 ){ // param cartSize dosnt exist, create it with reversed value parentURL += "&cartSize=" + (!minimize); } else { // param cartSize dosnt exist, replace it with reversed value parentURL = parentURL.replace( cs, "&cartSize=" + (!minimize) ); } window.top.location = parentURL; // redirect with reversed cartSize value }