//======================================================			// Setting expiredate			var ThreeDays = 3 * 24 * 60  * 60 * 1000;			var expDate = new Date();			expDate.setTime (expDate.getTime() + ThreeDays);		function sumIt(daField){			for(var i=1;i<=postCounter;i++){				tempA = ('a'+i);				tempP = ('p'+i);				tempU = ('u'+i);				daValue = parseInt(document.shop[tempA].value,10);				if((isNaN(daValue)==false) && (daValue != 0)){					daAntal = daAntal+daValue;					daSum = daSum+(daValue*document.shop[tempP].value);					daUid = document.shop[tempU].value;				}else{					document.shop[tempA].value = '0';				}		}					daAntal = daPrevAntal - daOldBoxAntal + daAntal;			daSum = daPrevSum - daOldBoxSum + daSum;						document.shop.antal.value = daAntal + " " + pcs //' st';						if(daSum > 0){				document.shop.sum.value = dotMaker(daSum) + currSymbol; 			}else{				document.shop.sum.value = '0' + currSymbol;			}					document.cookie="shoppingBasket=" + escape(daAntal + ':' + daSum) + ";expires=" + expDate.toGMTString();						daAntal = 0;			daSum = 0;						cookieMaker(daField);}//===================================================			//== Button for adding items ==	function addItem(daField){				var tempA = 'a' + daField;				//--Checking the field for empty value				if(document.shop[tempA].value == ''){					document.shop[tempA].value = 0				}				document.shop[tempA].value = parseInt(document.shop[tempA].value) + 1;							sumIt(daField);			}//===================================================				//== Button for deleting items ==	function deleteItem(daField){				var tempA = 'a' + daField				// --Checking the field for empty value				if(document.shop[tempA].value == ''){					document.shop[tempA].value = 0				}				document.shop[tempA].value = parseInt(document.shop[tempA].value) - 1;				//-- Checking for negative value				if(document.shop[tempA].value <= 0){					document.shop[tempA].value = 0;				}				sumIt(daField);			}//===================================================	function resetShop(){		if(confirm(basketRemoved)){			document.cookie="kaka=";			document.cookie="shoppingBasket=";			document.location.href='?open&id=2'; //assign/replace?		}	}	//===================================================	function changePgrp(grpId){		if (grpId.options[grpId.selectedIndex].value != ''){ 			self.window.location='?open&id=2&grpid=' + (grpId.options[grpId.selectedIndex].value); //assign/replace?		}		else		{			self.window.location='?open&id=2';		}	}//===================================================	function cookieMaker(daField){		var uField = 'u'+daField;		var aField = 'a'+daField;		var findText = document.shop[uField].value;		var originalString = getCookie('kaka');		if(originalString == null){			originalString = '';		}		var originalLen = originalString.length;		var pos = originalString.indexOf(findText);			if(pos != -1){			var preString = originalString.substring(0,pos);			var tempString = originalString.substring(pos,originalLen);			var splitPos = tempString.indexOf('#');			var replaceString = tempString.substring(0,splitPos);			var postString = tempString.substring(splitPos+1,tempString.length)			var newString = preString + findText + ':' + document.shop[aField].value + '#' + postString;				if((document.shop[aField].value == 0) || (document.shop[aField].value == null)){					newString = preString + postString;				}			document.cookie="kaka=" + escape(newString) + ";expires=" + expDate.toGMTString();		}else{			if((document.shop[aField].value != 0) && (document.shop[aField].value != null)){				document.cookie="kaka=" + escape(originalString) + escape(findText + ':' + document.shop[aField].value + '#') + ";expires=" + expDate.toGMTString();			}		}	}//===================================================	function chkSearch(){		if(document.shop.searchText.value == ''){			alert(searchWord);			document.shop.searchText.focus();			return false;		}		return true;	}//===================================================	function calcHeight()	{			try {						obj=document.getElementById('inFrame');				obj.style.display = "block";			obj.height = obj.contentWindow.document.body.scrollHeight;						}		catch(e) {					}			}
