Показать сообщение отдельно
  #17 (permalink)  
Старый 26.08.2011, 07:56
Интересующийся
Отправить личное сообщение для Lexxbry Посмотреть профиль Найти все сообщения от Lexxbry
 
Регистрация: 25.08.2011
Сообщений: 10

//Show Shipment options
function imCShowShipment(){
	var sBuf = "";
	var sCart = imGetCookie("imOrder");
	if(sCart == null)
		sCart = "";
	var iShipmentType = imGetCookie("imShipment");
	if(iShipmentType == null)
		iShipmentType = 0;
	for(var i = 0;i < imCShipment.length;i++)
		sBuf += "<p class=\"imShipItem\"><label for=\"imOption" + i + "\"><input name=\"imOption\" id=\"imOption" + i + "\" type=\"radio\" " + ( (i == iShipmentType) ? "checked=\"checked\"" : "" ) + "/><b>" + imCShipment[i][0] + "</b>" + (imCShipment[i][2] != 0 ? " (" + imCFormat(imCShipment[i][2],false) + ")" : "") + "<br />" + imCShipment[i][1] + "</label></p>";
	sBuf += "<p class=\"imAlign_center\"><input type=\"button\" class=\"imCartButton\" value=\"" + imLocale["GoShop"] + "\" onclick=\"imOpenLocation('" + imShopPage + "')\" /><input type=\"button\" class=\"imCartButton\" value=\"" + imLocale["EmptyCart"] + "\" onclick=\"imCEmptyCart('',false);\" />";
	if(sCart != "")
		sBuf += "<input type=\"submit\" class=\"imCartButton\" value=\"" + imLocale["GoNext"] + "\" />";
	document.write(sBuf);
}

//add shipment cost
function imCCheckout(){
	var i = 0;
	var bTrov = false;
	for(var j = 0;j < document.frmShipment.length && !bTrov; j++)
		if(document.frmShipment[j].name == "imOption"){
			if(document.frmShipment[j].checked==true){
				iShipmentType = i;
				bTrov = true;
			}
			i++;
		}
	imSetCookie("imShipment",iShipmentType,imExpireDays);
	imOpenLocation("imform.html");
}

//get user info
function imCGetUserData() {
	var j = 0;
	var sUserData = imGetCookie("imData");
	if(sUserData != null && sUserData != "") {
		var aUserData = sUserData.split("|");
		sUserData = "";
		for(var i = 0;i < document.imFormTableDat.elements.length;i++) {
			if(document.imFormTableDat.elements[i].name == "imTxtDat") {
				if(aUserData[j] == "")
					document.imFormTableDat.elements[i].value="";
				else
					document.imFormTableDat.elements[i].value=aUserData[j];
				aUserData[j] = imCLabels[j] + "::" + aUserData[j];
				j++;
			}
		}
	}
	return aUserData.join("||");
}
Ответить с цитированием