function printFlashHere(flashURL, width, height, imgURL) {
if(!flashURL || flashURL == "") {
return;
}
if (!imgURL) {
imgURL = flashURL.replace('\.swf','.jpg');
}
var time = new Date().getTime();
var flashArea = 'flash'+time;
document.write('
');
var flashvars = {};
var params = { menu: false, play: true, loop: true, quality: 'high', wmode: 'transparent', bgcolor: '#FFFFFF', allowscriptaccess: 'always'};
var attributes = {};
swfobject.embedSWF(flashURL, flashArea, width, height, "9.0.0", "expressInstall.swf", flashvars, params, attributes);
}
function getIEVersion() {
var rv = -1;
if (navigator.appName == 'Microsoft Internet Explorer') {
var ua = navigator.userAgent;
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
if (re.exec(ua) != null)
rv = parseFloat( RegExp.$1 );
}
return rv;
}
function hideAllVisibleSelectsInIE6(elementToExclude) {
var iev = getIEVersion();
if (iev > 0 && iev <= 6) {
jQuery('select').hide();
if (elementToExclude) {
elementToExclude.find("select").show();
}
}
}
function unhideAllVisibleSelectsInIE6() {
var iev = getIEVersion();
if (iev > 0 && iev <= 6) {
jQuery('select').show();
}
}
function GetCookie(sName){
var aCookie = document.cookie.split("; ");
for (var i=0; i < aCookie.length; i++)
{
var aCrumb = aCookie[i].split("=");
if (sName == aCrumb[0])
return unescape(aCrumb[1]);
}
return "";
}
function SetCookie(sName, sValue, path, expirationDate){
if(typeof(expirationDate) == "undefined"){
expirationDate = new Date();
expirationDate.setTime(expirationDate.getTime()+(365*24*60*60*1000));
}
document.cookie = sName + "=" + escape(sValue) + "; expires=" + expirationDate.toGMTString()
+ (path ? "; path=" + path : "");
}
function doNothing() {
}
function openPop(url,myname,myheight,mywidth){
myValues = 'height='+myheight+', width='+ mywidth+', titlebar=no, menubar=no, toolbar=no, resizable=no, scrollbars=yes, status=no';
window.open(url, myname, myValues);
}
function openGlassesInfoPop(){
window.open('glasses_infopop.jsp', 'GlassesInformationPop','height=700, width=620, titlebar=no, menubar=no, toolbar=no, resizable=yes, scrollbars=yes, status=no');
}
function gotoGlassesView(selectorGlasses){
document.location = selectorGlasses;
}
function openProductInfoPop(url){
window.open(url, 'ProductInformationPop','height=450, width=400, titlebar=no, menubar=no, toolbar=no, resizable=no, scrollbars=yes, status=no');
}
function openLensMissingPop(url){
window.open(url, 'LensMissingPop','height=300, width=500, titlebar=no, menubar=no, toolbar=no, resizable=no, scrollbars=yes, status=no');
}
function openWinnerWindow(url){
window.open(url, 'winner_pop','height=400, width=600, titlebar=no, menubar=no, toolbar=no, resizable=no, scrollbars=yes, status=no');
}
function openCompetitionWindow(url){
window.open(url, 'quiz_pop2','height=850, width=562, titlebar=no, menubar=no, toolbar=no, resizable=no, scrollbars=yes, status=no');
}
function openReminderWindow(){
window.open('about:blank', 'reminder_pop','height=400, width=600, titlebar=no, menubar=no, toolbar=no, resizable=no, scrollbars=yes, status=no');
submitForm(document.forms.reminder);
}
function openDeliveryTimePop(){
if (isCompleteOrder()) {
window.open('about:blank', 'deliverytime_pop','height=400, width=600, titlebar=no, menubar=no, toolbar=no, resizable=no, scrollbars=yes, status=no');
var os = serializeJSON({order:getCurrentOrder()});
document.getElementById("order_json2").value = os;
submitForm(document.forms.delivery);
} else {
alert('U moet alle informatie over de producten invullen zodat we de levertijd kunnen berekenen.');
}
}
function openAgbPop(){
window.open("agb.jsp", 'AgbPop','height=400, width=500, titlebar=no, menubar=no, toolbar=no, resizable=no, scrollbars=yes, status=no');
}
function openSurveyPop(url){
window.open(url, 'ProductInformationPop','height=300, width=400, titlebar=no, menubar=no, toolbar=no, resizable=no, scrollbars=yes, status=no');
}
function openCompetitionWindow(url){
window.open(url, 'quiz_pop2','height=850, width=562, titlebar=no, menubar=no, toolbar=no, resizable=no, scrollbars=yes, status=no');
}
function openCompetitionDoubleWindow(url){
window.open(url, 'quiz_pop2','height=600, width=600, titlebar=no, menubar=no, toolbar=no, resizable=no, scrollbars=yes, status=no');
submitForm(document.forms.double_order);
}
function allParametersSelected_Sol(productFieldNum) {
var productSelected = false;
var size_td = document.getElementById("solution_size_td"+productFieldNum);
var size_sel = document.getElementById("solution_size"+productFieldNum);
if(isHidden(size_td))
productSelected = true;
else if(size_sel == null || size_sel.options.length>0)
productSelected = true;
return productSelected;
}
function openConditionsInfoPop(openPage, titleName){
window.open(openPage, titleName,'height=400, width=500, titlebar=no, menubar=no, toolbar=no, resizable=no, scrollbars=yes, status=no');
}
function changeProductMenu(product_id){
if(product_id > 100000){
document.location = "product?pid=" + product_id;
} else {
document.location = "cart?prodid=" + product_id;
}
}
function askIfNewsLetter(){
}
//-------------------------------------------------------------------//
// detectBrowser() //
//-------------------------------------------------------------------//
// Detekterar vilken browser som anv�nds och returnerar detta //
//-------------------------------------------------------------------//
function detectBrowser(){
var browserName=navigator.appName;
return(browserName);
}
//-------------------------------------------------------------------//
// selectEntireList(selectBox, valueToSet) //
//-------------------------------------------------------------------//
// V�ljer valueToSet ur selectboxen selectBox //
//-------------------------------------------------------------------//
function selectEntireList(selectBox, valueToSet){
var fromObj = selectBox;
for ( selIndex = fromObj.length; selIndex -- ; selIndex > 0 ){
if(fromObj.options[selIndex].value == valueToSet){
fromObj.options[selIndex].selected = true;
}
}
}
//-------------------------------------------------------------------//
// mouseOverHorizontalMenu(buttonId) //
//-------------------------------------------------------------------//
// MouseOver-function f�r knappar //
//-------------------------------------------------------------------//
function mouseOverHorizontalMenu(buttonId){
left = document.getElementById("horizontalMenuLeft_" + buttonId);
middle = document.getElementById("horizontalMenuMiddle_" + buttonId);
right = document.getElementById("horizontalMenuRight_" + buttonId);
left.src = "/images/horizontal_menu/menu_left_over.gif";
middle.style.backgroundImage = "url('/images/horizontal_menu/menu_middle_over.gif')";
right.src = "/images/horizontal_menu/menu_right_over.gif";
}
//-------------------------------------------------------------------//
// mouseOutHorizontalMenu(buttonId) //
//-------------------------------------------------------------------//
// MouseOut-function f�r knappar //
//-------------------------------------------------------------------//
function mouseOutHorizontalMenu(buttonId){
left = document.getElementById("horizontalMenuLeft_" + buttonId);
middle = document.getElementById("horizontalMenuMiddle_" + buttonId);
right = document.getElementById("horizontalMenuRight_" + buttonId);
left.src = "/images/horizontal_menu/menu_left.gif";
middle.style.backgroundImage = "url('/images/horizontal_menu/menu_middle.gif')";
right.src = "/images/horizontal_menu/menu_right.gif";
}
//-------------------------------------------------------------------//
// mouseOverHorizontalMenu(buttonId) //
//-------------------------------------------------------------------//
// MouseOver-function f�r knappar //
//-------------------------------------------------------------------//
function mouseOverHorizontalMenu2(buttonId){
left = document.getElementById("horizontalMenuLeft_" + buttonId);
middle = document.getElementById("horizontalMenuMiddle_" + buttonId);
right = document.getElementById("horizontalMenuRight_" + buttonId);
left.src = "/images/horizontal_menu/menu2_left_over.gif";
middle.style.backgroundImage = "url('/images/horizontal_menu/menu2_middle_over.gif')";
right.src = "/images/horizontal_menu/menu2_right_over.gif";
}
//-------------------------------------------------------------------//
// mouseOutHorizontalMenu(buttonId) //
//-------------------------------------------------------------------//
// MouseOut-function f�r knappar //
//-------------------------------------------------------------------//
function mouseOutHorizontalMenu2(buttonId){
left = document.getElementById("horizontalMenuLeft_" + buttonId);
middle = document.getElementById("horizontalMenuMiddle_" + buttonId);
right = document.getElementById("horizontalMenuRight_" + buttonId);
left.src = "/images/horizontal_menu/menu2_left.gif";
middle.style.backgroundImage = "url('/images/horizontal_menu/menu2_middle.gif')";
right.src = "/images/horizontal_menu/menu2_right.gif";
}
function hideField(field) {
if (field && !isHidden(field))
field.className += " hidden";
}
function unhideField(field) {
if (field) {
field.className = field.className.replace(/hidden/, "");
}
}
function isHidden(field) {
return field && field.className.match("hidden");
}
function submitForm(curr_form) {
curr_form.submit();
}
function warningExtraPurchase(curr_form) {
if(confirm('Weet u zeker dat u deze producten wilt toevoegen?')){
submitForm(curr_form);
}
}
String.prototype.encode_lzw=function(){
var dict={};
var data=(this+"").split("");
var out=[];
var currChar;
var phrase=data[0];
var code=256;
for(var i=1;i1?dict[phrase]:phrase.charCodeAt(0));
dict[phrase+currChar]=code;
code++;
phrase=currChar;
}
}
out.push(phrase.length>1?dict[phrase]:phrase.charCodeAt(0));
for(var i=0;i