﻿//  e = Element//  f = Form//  i = item//  v = Value//  t = target// ty = type// Set Cookiefunction setCookie(NameOfCookie, value, expiredays) {	var ExpireDate = new Date ();	ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));	document.cookie = NameOfCookie + "=" + escape(value) + 	((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString()) + "; path=/;"}function csbCal(v) {		var StrTotal = 0	var ae = v.parentElement.parentElement.parentElement	var StrReturn = ae.children.length;	var BoxPcs = ae.parentElement.box;	var alertBox = ae.parentElement.parentElement.children		var x = v.parentElement.parentElement.parentElement.children;	for (var i=0;i<x.length;i++) {		var y = x(i).children				for (var u=0;u<y.length;u++) {			if (y(u).tagName == "TD") {				var z = y(u).children				for (var o=0;o<z.length;o++) {					if (z(o).tagName == "SPAN") {												if (z(o).innerHTML != "") {							StrTotal = StrTotal + parseInt(z(o).innerHTML) ;							}					}				}			}		}	}		if (StrTotal == BoxPcs) {		alertBox(1).innerHTML = "";		alertBox(1).className = "";	} else {		alertBox(1).innerHTML = "Sortiment does not match with styles per box.\<br \/\>\<strong\>Box size: " + BoxPcs + "pcs. -  Current number: " + StrTotal + "pcs.\<\/strong\>";		alertBox(1).className = "CSBalert";	}}function SaveData(url,g,f,v,t1,t2,t3) {	if (!d) {		d = 1	} else {		d = d + 1		}var DataToSend = "value=" + escape(v) + "&field=" + f + "&guid=" + g;var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");xmlhttp.Open("POST",url + "?t=" + d,false);xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");xmlhttp.send(DataToSend);strReturn = xmlhttp.responseText//alert( strreturn )//alert(t1)if (t1) {	if (t1 != "") { document.getElementById(t1).innerHTML = strReturn };}if (t2) {	if (t2 != "") { document.getElementById(t2).innerHTML = strReturn };}if (t3) {	if (t3 != "") { document.getElementById(t3).innerHTML = strReturn };}//setStatus(strReturn)}function GetInfo() {	return "&brand=" + document.getElementById("info").brand + "&year=" + document.getElementById("info").year + "&collection=" + document.getElementById("info").collection;}/*ActiveX WorkaroundLicense:activateActiveX is Copyright (C) 2006 Jason Baker (therippa AT gmail.com. It is available as open source code from:http://therippa.blogspot.comThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details http://www.gnu.org/licenses/gpl.html*/window.onload = function () {     if (navigator.appName == "Microsoft Internet Explorer") {    		    var arrElements = new Array(3);	    arrElements[0] = "object";	    arrElements[1] = "embed";	    arrElements[2] = "applet";	    for (n = 0; n < arrElements.length; n++) {		    replaceObj = document.getElementsByTagName(arrElements[n]);		    for (i = 0; i < replaceObj.length; i++ ) {			    parentObj = replaceObj[i].parentNode;			    newHTML = parentObj.innerHTML;			    parentObj.removeChild(replaceObj[i]);			    parentObj.innerHTML = newHTML;    					    }		    }	    }}	
