function toggle_bgcolor(obj,mode,site_id){ bgClr = new Array(); bgClr['pink'] = new Array('#D60D8C','#f9cce0'); bgClr['blue'] = new Array('#002D56','#B9E1F7'); fColor = new Array(); fColor[0] = '#FFFFFF'; fColor[1] = '#000000'; obj.style.backgroundColor = bgClr[site_id][mode]; obj.firstChild.style.color = fColor[mode]; } function changeaction(){ var formObj = document.getElementById('confirm_form'); url="http://"; url+=location.hostname; url+=location.pathname; url+="?action=order"; formObj.action=url; formObj.submit(); } function showHideShip(num){ Obj = document.getElementById('billing_address'); if(num == 1){ Obj.style.visibility = 'hidden'; Obj.style.display = 'none'; }else{ Obj.style.visibility = 'visible'; Obj.style.display = 'block'; } } function showHideShipDiv(num){ Obj = document.getElementById('shipInfoDiv'); if(num == 1){ Obj.style.visibility = 'hidden'; Obj.style.display = 'none'; }else{ Obj.style.visibility = 'visible'; Obj.style.display = 'block'; } } function validate_user(){ var Obj1 = document.getElementById('username'); var Obj2 = document.getElementById('password'); if(Obj1.value == "" || Obj2.value == ""){ return(0); }else{ return(1); } } /*cursor functions*/ function startMouse(){ var bodyObj = document.getElementsByTagName('body')[0]; bodyObj.onfocus = function(e){ moveMouse(e); } bodyObj.onmousemove = function(e){ moveMouse(e); } } function stopMouse(){ var curObj = document.getElementById('cursorCont'); curObj.style.visibility = 'hidden'; curObj.style.display = 'none'; } function moveMouse(event){ clearTimeout(curT); var e = (window.event) ? window.event : event; var x = e.clientX + document.documentElement.scrollLeft + document.body.scrollLeft; var y = e.clientY + document.documentElement.scrollTop + document.body.scrollTop; var screenW = document.body.clientWidth + document.documentElement.scrollLeft + document.body.scrollLeft;; var screenH = document.body.clientHeight + document.documentElement.scrollTop + document.body.scrollTop; var bodyObj = document.getElementsByTagName('body')[0]; bodyObj.onmouseout = function(e){ } bodyObj.onfocus = function(e){ moveMouse(); } var curObj = document.getElementById('cursorCont'); if(!curObj){ var curObj = document.createElement('DIV'); curObj.id = 'cursorCont'; curObj.style.position = 'absolute'; curObj.style.width = curWidth + 'px'; curObj.style.height = curHeight + 'px'; curObj.style.overflow = 'hidden'; for(var i=0; i screenH){ var diffY = cursorB - screenH; diffY = (diffY > curHeight) ? curHeight : diffY; curObj.style.height = curHeight - diffY; if(diffY == curHeight){ curObj.style.visibility = 'hidden'; curObj.style.display = 'none'; curObj.style.height = curHeight; }else{ curObj.style.visibility = 'visible'; curObj.style.display = 'block'; } } if(cursorR > screenW){ var diffX = cursorR - screenW; diffX = (diffX > curWidth) ? curWidth : diffX; curObj.style.width = curWidth - diffX; if(diffX == curWidth){ curObj.style.visibility = 'hidden'; curObj.style.display = 'none'; curObj.style.width = curWidth; }else{ curObj.style.visibility = 'visible'; curObj.style.display = 'block'; } } curT = setTimeout("stopFire()",1000); } function stopFire(){ var contObj = document.getElementById('cursor_1'); contObj.style.visibility = 'hidden'; } function printSubcategoryDrop(category,selectedId){ var ajaxVar = new ajaxVars(); if(selectedId){ ajaxVar.fnVars['selectedId'] = selectedId; } if(category){ var CategoryId = category; }else{ var CategoryId = document.forms['searchform'].elements['category'].value; } ajaxVar.vars['action'] = "db_fetch_array"; ajaxVar.vars['sql_type'] = "select"; ajaxVar.vars['sql_what'] = "id, label as subcategory"; ajaxVar.vars['sql_from'] = 'product_maincat'; ajaxVar.vars['sql_where'] = ""; if(CategoryId != 'all'){ ajaxVar.vars['sql_where'] += "cat_parent_id='"+CategoryId+"' and "; } ajaxVar.vars['sql_where'] += " active='1' "; ajaxVar.vars['sql_order'] = 'id'; ajaxVar.fnVars['formName'] = 'searchform'; ajaxVar.fnVars['fieldName'] = 'subcategory'; ajaxVar.gotoFunction = 'putDropDownAll'; ajaxVar.AjaxPostSQL(); var frmObj = document.getElementById('subcatdiv'); var frmObj1 = document.getElementById('subsubcatdiv'); var frmObj2 = document.getElementById('designerdiv'); var frmObj3 = document.getElementById('seasondiv'); var frmObj4 = document.getElementById('sizediv'); frmObj.style.visibility = 'visible'; frmObj.style.display = 'block'; frmObj1.style.visibility = 'hidden'; frmObj1.style.display = 'none'; document.getElementById('subsubcategory').options.length = 0; frmObj4.style.visibility = 'hidden'; frmObj4.style.display = 'none'; document.forms['searchform'].size.options.length = 0; frmObj3.style.visibility = 'hidden'; frmObj3.style.display = 'none'; document.getElementById('season').options.length = 0; frmObj2.style.visibility = 'hidden'; frmObj2.style.display = 'none'; document.getElementById('designer').options.length = 0; } function countMainCat(dataArr, fnVars){ var frmObj = document.getElementById('subcatdiv'); var frmObj1 = document.getElementById('subsubcatdiv'); var frmObj2 = document.getElementById('designerdiv'); var frmObj3 = document.getElementById('seasondiv'); var frmObj4 = document.getElementById('sizediv'); if(dataArr['id'].length > 1){ frmObj.style.visibility = 'visible'; frmObj.style.display = 'block'; frmObj1.style.visibility = 'hidden'; frmObj1.style.display = 'none'; frmObj2.style.visibility = 'hidden'; frmObj2.style.display = 'none'; frmObj3.style.visibility = 'hidden'; frmObj3.style.display = 'none'; frmObj4.style.visibility = 'hidden'; frmObj4.style.display = 'none'; putDropDownAll(dataArr, fnVars); }else{ frmObj.style.visibility = 'hidden'; frmObj.style.display = 'none'; frmObj2.style.visibility = 'hidden'; frmObj2.style.display = 'none'; frmObj3.style.visibility = 'hidden'; frmObj3.style.display = 'none'; frmObj4.style.visibility = 'hidden'; frmObj4.style.display = 'none'; document.getElementById('sLevel').value = dataArr[1][0]; printSubSubcategoryDrop(dataArr[1][0]); } } function printAgeDrop(subcategory,selectedId){ var ajaxVar = new ajaxVars(); if(selectedId){ ajaxVar.fnVars['selectedId'] = selectedId; } if(subcategory){ var SubcategoryId = subcategory; }else{ var SubcategoryId = document.forms['searchform'].elements['subsubcategory'].value; } ajaxVar.vars['action'] = "db_fetch_array"; ajaxVar.vars['sql_type'] = "select"; ajaxVar.vars['sql_what'] = "distinct d.id as id, d.name as designer"; ajaxVar.vars['sql_from'] = 'products as p left join designer as d on p.manufacturer = d.id '; ajaxVar.vars['sql_where'] = ""; if(SubcategoryId != 'all'){ ajaxVar.vars['sql_where'] += "p.cat_id ='"+SubcategoryId+"' and "; } ajaxVar.vars['sql_where'] += "p.active='1' and p.manufacturer != 'NULL' and d.active='1'"; ajaxVar.vars['sql_order'] = 'id'; ajaxVar.fnVars['formName'] = 'searchform'; ajaxVar.fnVars['fieldName'] = 'designer'; ajaxVar.gotoFunction = 'putDropDownAll'; ajaxVar.AjaxPostSQL(); var frmObj = document.getElementById('designerdiv'); var frmObj3 = document.getElementById('seasondiv'); var frmObj4 = document.getElementById('sizediv'); frmObj4.style.visibility = 'visible'; frmObj4.style.display = 'block'; frmObj3.style.visibility = 'hidden'; frmObj3.style.display = 'none'; document.getElementById('season').options.length = 0; frmObj.style.visibility = 'hidden'; frmObj.style.display = 'none'; document.getElementById('designer').options.length = 0; } function printSizeDrop(subcategory,selectedId){ var ajaxVar = new ajaxVars(); if(selectedId){ ajaxVar.fnVars['selectedId'] = selectedId; } if(subcategory){ var SubcategoryId = subcategory; }else{ var SubcategoryId = document.forms['searchform'].elements['subsubcategory'].value; } ajaxVar.vars['action'] = "db_fetch_array"; ajaxVar.vars['sql_type'] = "select"; ajaxVar.vars['sql_what'] = "distinct ps.size as id , ps.size as size "; ajaxVar.vars['sql_from'] = 'products as p left join product_size as ps on p.id = ps.product_id'; ajaxVar.vars['sql_where'] = ""; if(SubcategoryId != 'all'){ ajaxVar.vars['sql_where'] += "p.cat_id ='"+SubcategoryId+"' and "; } ajaxVar.vars['sql_where'] += "p.active='1' and ps.avail='1'"; ajaxVar.vars['sql_order'] = 'id'; ajaxVar.fnVars['formName'] = 'searchform'; ajaxVar.fnVars['fieldName'] = 'size'; ajaxVar.gotoFunction = 'putDropDownAll'; ajaxVar.AjaxPostSQL(); var frmObj = document.getElementById('designerdiv'); var frmObj3 = document.getElementById('seasondiv'); var frmObj4 = document.getElementById('sizediv'); frmObj4.style.visibility = 'visible'; frmObj4.style.display = 'block'; frmObj3.style.visibility = 'hidden'; frmObj3.style.display = 'none'; document.getElementById('season').options.length = 0; frmObj.style.visibility = 'hidden'; frmObj.style.display = 'none'; document.getElementById('designer').options.length = 0; } function printDesignerDrop(subcategory,size,season,selectedId){ var ajaxVar = new ajaxVars(); if(selectedId){ ajaxVar.fnVars['selectedId'] = selectedId; } if(size){ var SizeId = size; }else{ var SizeId = document.forms['searchform'].elements['size'].value; } if(season){ var SeasonId = season; }else{ var SeasonId = document.forms['searchform'].elements['season'].value; } if(subcategory){ var SubcategoryId = subcategory; }else{ var SubcategoryId = document.forms['searchform'].elements['subsubcategory'].value; } ajaxVar.vars['action'] = "db_fetch_array"; ajaxVar.vars['sql_type'] = "select"; ajaxVar.vars['sql_what'] = "distinct d.id as id, d.name as designer"; ajaxVar.vars['sql_from'] = 'products as p left join product_size as ps on p.id = ps.product_id left join designer as d on p.manufacturer = d.id'; ajaxVar.vars['sql_where'] = ""; if(SubcategoryId != 'all'){ ajaxVar.vars['sql_where'] += "p.cat_id ='"+SubcategoryId+"' and "; } if(SizeId != 'all'){ ajaxVar.vars['sql_where'] += "ps.size = '"+SizeId+"' and "; } if(SeasonId != 'all'){ ajaxVar.vars['sql_where'] += "p.season = '"+SeasonId+"' and "; } ajaxVar.vars['sql_where'] += "p.active='1' and p.manufacturer != 'NULL' and d.active='1'"; ajaxVar.vars['sql_order'] = 'id'; ajaxVar.fnVars['formName'] = 'searchform'; ajaxVar.fnVars['fieldName'] = 'designer'; ajaxVar.gotoFunction = 'putDropDownAll'; ajaxVar.AjaxPostSQL(); var frmObj = document.getElementById('designerdiv'); frmObj.style.visibility = 'visible'; frmObj.style.display = 'block'; } function printSeasonDrop(subcategory,size,selectedId){ var ajaxVar = new ajaxVars(); if(selectedId){ ajaxVar.fnVars['selectedId'] = selectedId; } if(size){ var SizeId = size; }else{ var SizeId = document.forms['searchform'].elements['size'].value; } if(subcategory){ var SubcategoryId = subcategory; }else{ var SubcategoryId = document.forms['searchform'].elements['subsubcategory'].value; } ajaxVar.vars['action'] = "db_fetch_array"; ajaxVar.vars['sql_type'] = "select"; ajaxVar.vars['sql_what'] = "distinct s.id as id, s.name as season "; ajaxVar.vars['sql_from'] = 'products as p left join seasons as s on p.season = s.id left join product_size as ps on p.id = ps.product_id'; ajaxVar.vars['sql_where'] = ""; if(SubcategoryId != 'all'){ ajaxVar.vars['sql_where'] += "p.cat_id ='"+SubcategoryId+"' and "; } if(SizeId != 'all'){ ajaxVar.vars['sql_where'] += "ps.size = '"+SizeId+"' and "; } ajaxVar.vars['sql_where'] += "p.active='1' and p.season != 'NULL' and s.active='1'"; ajaxVar.vars['sql_order'] = 'id'; ajaxVar.fnVars['formName'] = 'searchform'; ajaxVar.fnVars['fieldName'] = 'season'; ajaxVar.gotoFunction = 'putDropDownAll'; ajaxVar.AjaxPostSQL(); var frmObj = document.getElementById('seasondiv'); var frmObj1 = document.getElementById('designerdiv'); frmObj.style.visibility = 'visible'; frmObj.style.display = 'block'; frmObj1.style.visibility = 'hidden'; frmObj1.style.display = 'none'; document.getElementById('designer').options.length = 0; } function putDropDownAll(dataArr, fnVars){ var dropField = document.forms[fnVars['formName']].elements[fnVars['fieldName']]; if(dropField) { dropField.options.length = 0; dropField.options[0] = new Option('Alle','all'); if(dataArr != 'empty') { for(var i=0; i 1){ var dec = nums[1].substring(0,2); newNum = nums[0] + "," + dec; }else{ newNum = num; } // var cnt = newNum.length; // if(newNum[cnt-2] == ','){ // newNum = newNum + "0"; // } // if() // alert(newNum); // var cnt = newNum.length; // alert(newNum[cnt-2] ); return(newNum) } function calcfinalAmount(grandTotal,limitamt,shipcharge){ numVal = (isNaN(grandTotal)) ? 0 : parseFloat(grandTotal); if(numVal <= limitamt){ shipping_amt = shipcharge; final_amt = numVal + shipcharge; }else{ shipping_amt = 0; final_amt = numVal; } if(document.getElementById('s_country').value == 5){ document.frm_info.shipping_amt.value = "auf Anfrage"; }else{ shipping_amt = formatNumber(shipping_amt); document.frm_info.shipping_amt.value = shipping_amt; } // final_amt = formatNumber(final_amt); // document.frm_info.final_amt.value = final_amt; document.frm_info.final_amt.value = format_number(parseFloat(final_amt),2,',',' '); } function calculateshipcost(grandTotal){ // grandTotal=document.getElementById('totdiscount').innerHTML.replace(',','.'); // alert(document.getElementById('totdiscount').innerHTML); var numVal=shipping_amt=final_amt=""; if(document.getElementById('ship_type_1').checked == true){ numVal = (isNaN(grandTotal)) ? 0 : parseFloat(grandTotal); // alert(numVal); if(numVal <= 150){ shipping_amt = 4.95; final_amt = numVal+4.95; }else{ shipping_amt = 0; final_amt = numVal; } shipping_amt = formatNumber(shipping_amt); // alert(final_amt); // final_amt = formatNumber(final_amt); document.frm_info.shipping_amt.value = shipping_amt; // alert(format_number(parseFloat(final_amt),2,',',' ')); document.frm_info.final_amt.value = format_number(parseFloat(final_amt),2,',',' '); }else if(document.getElementById('ship_type_2').checked == true){ numVal=shipping_amt=final_amt=""; numVal = (isNaN(grandTotal)) ? 0 : parseFloat(grandTotal); if(numVal <= 150){ //4.95+12.50 = 17.45 This is how we get the shipping amount = 17.45 in this case shipping_amt = 17.45; final_amt = numVal+17.45; }else{ shipping_amt = 12.50; final_amt = numVal+ 12.50; } shipping_amt = formatNumber(shipping_amt); // final_amt = formatNumber(final_amt); document.frm_info.shipping_amt.value = shipping_amt; // document.frm_info.final_amt.value = final_amt; // alert(format_number(parseFloat(final_amt),2,',',' ')); document.frm_info.final_amt.value = format_number(parseFloat(final_amt),2,',',' '); } } function addOption(selectbox,text,value ){ var optn = document.createElement("OPTION"); optn.text = text; optn.value = value; selectbox.options.add(optn); } function showPersonalDetails(land){ Obj1 = document.getElementById('s_location'); Obj2 = document.getElementById('s_country_other'); var loc=new Array(8); loc[1]="Deutschland"; loc[2]="Belgien"; loc[3]="Dänemark"; loc[4]="Luxemburg"; loc[5]="Niederlande"; loc[6]="Österreich"; loc[7]="Schweiz"; loc[8]="Liechtenstein"; if(land == 2){ var bodyTd = document.getElementById('showland'); var locOptions = document.form_changeDetails.s_location; locOptions.options.length=0; bodyTd.innerHTML = ''; bodyTd.innerHTML = ''; }else if(land == 3){ var bodyTd = document.getElementById('showland'); bodyTd.innerHTML = ''; bodyTd.innerHTML = ''; }else if(land == 4){ var bodyTd = document.getElementById('showland'); var locOptions = document.form_changeDetails.s_location; locOptions.options.length=0; bodyTd.innerHTML = ''; bodyTd.innerHTML = ''; }else if(land == 5){ var bodyTd = document.getElementById('showland'); bodyTd.innerHTML = ''; bodyTd.innerHTML = ''; } } function swapimage(lid,lvar,rid,rvar) { document.getElementById(lid).src = lvar.src; document.getElementById(rid).src = rvar.src; } function swapclass(eid, classn) { document.getElementById(eid).className = classn; } function chkchangeDetails(){ var sessloginId; sessloginId = ""; if(sessloginId){ if(document.getElementById('changeDetailsDiv').style.visibility == "hidden"){ document.getElementById('sCountryOthrBlock').style.visibility = "hidden"; document.getElementById('sCountryOthrBlock').style.display = "none"; document.getElementById('location_drop2').style.visibility = "hidden"; document.getElementById('location_drop2').style.display = "none"; document.getElementById('bCountryOthrBlock').style.visibility = "hidden"; document.getElementById('bCountryOthrBlock').style.display = "none"; document.getElementById('location_drop1').style.visibility = "hidden"; document.getElementById('location_drop1').style.display = "none"; }else{ var loc=new Array(8); loc[1]="Deutschland"; loc[2]="Belgien"; loc[3]="Dänemark"; loc[4]="Luxemburg"; loc[5]="Niederlande"; loc[6]="Österreich"; loc[7]="Schweiz"; loc[8]="Liechtenstein"; if((document.getElementById('s_country').value == 2) || (document.getElementById('s_country').value == 4)){ document.getElementById('location_drop2').style.visibility = "visible"; document.getElementById('location_drop2').style.display = "block"; var locOptions = document.form_changeDetails.s_location; locOptions.options.length=0; if(document.getElementById('s_country').value == 2){ for (var i=2; i <=6; i++){ addOption(document.form_changeDetails.s_location, loc[i], i); } for (i=0; i < locOptions.options.length; i++){ if(locOptions.options[i].value == ''){ locOptions.options[i].selected = true; } } }else if(document.getElementById('s_country').value == 4){ for (var j=7; j <=8; j++){ addOption(document.form_changeDetails.s_location, loc[j], j); } for (j=0; j < locOptions.options.length; j++){ var test = ''; if(locOptions.options[j].value == ''){ locOptions.options[j].selected = true; } } } }else if((document.getElementById('s_country').value == 3) || (document.getElementById('s_country').value == 5)){ document.getElementById('sCountryOthrBlock').style.visibility = "visible"; document.getElementById('sCountryOthrBlock').style.display = "block"; } if((document.getElementById('b_country').value == 2) || (document.getElementById('b_country').value == 4)){ document.getElementById('location_drop1').style.visibility = "visible"; document.getElementById('location_drop1').style.display = "block"; var locOptions = document.form_changeDetails.b_location; locOptions.options.length=0; if(document.getElementById('b_country').value == 2){ for (var i=2; i <=6; i++){ addOption(document.form_changeDetails.b_location, loc[i], i); } for (i=0; i < locOptions.options.length; i++){ if(locOptions.options[i].value == ''){ locOptions.options[i].selected = true; } } }else if(document.getElementById('b_country').value == 4){ for (var j=7; j <=8; j++){ addOption(document.form_changeDetails.b_location, loc[j], j); } for (j=0; j < locOptions.options.length; j++){ var test = ''; if(locOptions.options[j].value == ''){ locOptions.options[j].selected = true; } } } }else if((document.getElementById('b_country').value == 3) || (document.getElementById('b_country').value == 5)){ document.getElementById('bCountryOthrBlock').style.visibility = "visible"; document.getElementById('bCountryOthrBlock').style.display = "block"; } } } } function showHideMenu(id, val){ var divObj = document.getElementById('topMenuDiv'); if(val == 1) { divObj.style.visibility = "visible"; divObj.style.display = "block"; }else{ divObj.style.visibility = "hidden"; divObj.style.display = "none"; } } function printSubSubcategoryDrop(subcategory,selectedId){ var ajaxVar = new ajaxVars(); if(selectedId){ ajaxVar.fnVars['selectedId'] = selectedId; } if(subcategory){ var SubCategoryId = subcategory; }else{ var SubCategoryId = document.forms['searchform'].elements['subcategory'].value; } ajaxVar.vars['action'] = "db_fetch_array"; ajaxVar.vars['sql_type'] = "select"; ajaxVar.vars['sql_what'] = "distinct pm.id as id, pm.label as subsubcategory"; ajaxVar.vars['sql_from'] = 'product_maincat as pm inner join products as p on pm.id=p.cat_id'; ajaxVar.vars['sql_where'] = ""; if(SubCategoryId != 'all'){ ajaxVar.vars['sql_where'] += "pm.cat_parent_id='"+SubCategoryId+"' and "; } ajaxVar.vars['sql_where'] += " pm.active='1' "; ajaxVar.vars['sql_order'] = 'id'; ajaxVar.fnVars['formName'] = 'searchform'; ajaxVar.fnVars['fieldName'] = 'subsubcategory'; ajaxVar.gotoFunction = 'putDropDownAll'; ajaxVar.AjaxPostSQL(); var frmObj = document.getElementById('subsubcatdiv'); var frmObj1 = document.getElementById('designerdiv'); var frmObj2 = document.getElementById('seasondiv'); var frmObj3 = document.getElementById('sizediv'); frmObj.style.visibility = 'visible'; frmObj.style.display = 'block'; frmObj1.style.visibility = 'hidden'; frmObj1.style.display = 'none'; document.getElementById('designer').options.length = 0; frmObj2.style.visibility = 'hidden'; frmObj2.style.display = 'none'; document.getElementById('season').options.length = 0; frmObj3.style.visibility = 'hidden'; frmObj3.style.display = 'none'; document.forms['searchform'].size.options.length = 0; } function changeFlag(num){ if(num == 1){ document.getElementById('billing_add1').value = 1; }else{ document.getElementById('billing_add1').value = 2; checkLand(); } } function getxPos(cId){ var mainId = "td_"+cId; document.getElementById('subCats').style.visiblity = "hidden"; document.getElementById('subCats').style.display = "none"; var objTd = document.getElementById(mainId); var xpos = findPosX(objTd); document.getElementById('subCats').style.left = xpos + 'px'; document.getElementById('subCats').style.visiblity = "visible"; document.getElementById('subCats').style.display = "block"; } function findPosX(obj) { var curleft = 0; if (obj.offsetParent) { while (obj.offsetParent) { curleft += obj.offsetLeft obj = obj.offsetParent; } } else if (obj.x) curleft += obj.x; return curleft; } function postData(){ var formObject1 = document.newDesigner; formObject1.action = 'search.php'; formObject1.enctype = "multipart/form-data"; formObject1.submit(); } function postDataSeason(){ var formObject1 = document.newDesigner; document.getElementById('sortArr').value = 0; formObject1.action = 'search.php'; formObject1.enctype = "multipart/form-data"; formObject1.submit(); } function postSeasonData(){ var formObject2 = document.sortByDesigner; // document.getElementById('sortArr').value = 0; formObject2.action = 'products.php'; formObject2.enctype = "multipart/form-data"; formObject2.submit(); } function postDesignerData(){ var formObject2 = document.sortByDesigner; formObject2.action = 'products.php'; formObject2.enctype = "multipart/form-data"; formObject2.submit(); } function checkLand(){ var sessId; sessId = ""; Obj11 = document.getElementById('ship_block1'); Obj21 = document.getElementById('ship_block2'); Obj31 = document.getElementById('ship_block3'); Obj41 = document.getElementById('location_drop11'); Obj61 = document.getElementById('bCountryOthrBlock1'); Obj71 = document.getElementById('location_drop21'); Obj91 = document.getElementById('pay_type3'); Obj101 = document.getElementById('pay_type4'); Objpaytype2 = document.getElementById('pay_type2'); var loc=new Array(8); loc[1]="Deutschland"; loc[2]="Belgien"; loc[3]="Dänemark"; loc[4]="Luxemburg"; loc[5]="Niederlande"; loc[6]="Österreich"; loc[7]="Schweiz"; loc[8]="Liechtenstein"; if(document.getElementById('s_country').value == 1){ var grandTotal; Obj11.style.visibility = 'visible'; Obj11.style.display = 'block'; Obj21.style.visibility = 'visible'; Obj21.style.display = 'block'; Obj31.style.visibility = 'hidden'; Obj31.style.display = 'none'; Obj41.style.visibility = 'hidden'; Obj41.style.display = 'none'; Obj61.style.visibility = 'hidden'; Obj61.style.display = 'none'; Obj91.style.visibility = 'visible'; Obj91.style.display = 'block'; Objpaytype2.style.visibility = 'visible'; Objpaytype2.style.display = 'block'; var sessionLoginId = ""; if(sessionLoginId){ var ajaxVar = new ajaxVars(); var emailID = document.forms['frm_info'].elements['email'].value; ajaxVar.vars['action'] = "db_fetch_array"; ajaxVar.vars['sql_type'] = "select"; ajaxVar.vars['sql_what'] = "count(u.id) as rec "; ajaxVar.vars['sql_from'] = "users as u left join invoices as i on i.user_id = u.id "; ajaxVar.vars['sql_where'] = "u.email = '"+emailID+"'"; ajaxVar.fnVars['formName'] = 'frm_info'; ajaxVar.gotoFunction = 'checkDataExists'; ajaxVar.AjaxPostSQL(); } grandTotal = ""; calculateshipcost(grandTotal); }else if(document.getElementById('s_country').value == 2){ Obj11.style.visibility = 'hidden'; Obj11.style.display = 'none'; Obj21.style.visibility = 'visible'; Obj21.style.display = 'block'; Obj31.style.visibility = 'hidden'; Obj31.style.display = 'none'; Obj41.style.visibility = 'visible'; Obj41.style.display = 'block'; Obj61.style.visibility = 'hidden'; Obj61.style.display = 'none'; Obj91.style.visibility = 'hidden'; Obj91.style.display = 'none'; Obj101.style.visibility = 'hidden'; Obj101.style.display = 'none'; Objpaytype2.style.visibility = 'visible'; Objpaytype2.style.display = 'block'; var locOptions = document.frm_info.s_location; locOptions.options.length=0; for (var i=2; i <=6; i++){ addOption(document.frm_info.s_location, loc[i], i); } for (i=0; i < locOptions.options.length; i++){ if(locOptions.options[i].value == ''){ locOptions.options[i].selected = true; } } grandTotal = ""; calcfinalAmount(grandTotal,250,7.95); }else if(document.getElementById('s_country').value == 3){ Obj11.style.visibility = 'hidden'; Obj11.style.display = 'none'; Obj21.style.visibility = 'visible'; Obj21.style.display = 'block'; Obj31.style.visibility = 'visible'; Obj31.style.display = 'block'; Obj41.style.visibility = 'hidden'; Obj41.style.display = 'none'; Obj61.style.visibility = 'hidden'; Obj61.style.display = 'none'; Obj91.style.visibility = 'hidden'; Obj91.style.display = 'none'; Obj101.style.visibility = 'hidden'; Obj101.style.display = 'none'; Objpaytype2.style.visibility = 'visible'; Objpaytype2.style.display = 'block'; document.frm_info.s_country_other.value = ""; grandTotal = ""; calcfinalAmount(grandTotal,500,10.00); }else if(document.getElementById('s_country').value == 4){ Obj11.style.visibility = 'hidden'; Obj11.style.display = 'none'; Obj21.style.visibility = 'visible'; Obj21.style.display = 'block'; Obj31.style.visibility = 'hidden'; Obj31.style.display = 'none'; Obj41.style.visibility = 'visible'; Obj41.style.display = 'block'; Obj61.style.visibility = 'hidden'; Obj61.style.display = 'none'; Obj91.style.visibility = 'hidden'; Obj91.style.display = 'none'; Obj101.style.visibility = 'hidden'; Obj101.style.display = 'none'; Objpaytype2.style.visibility = 'visible'; Objpaytype2.style.display = 'block'; var locOptions = document.frm_info.s_location; locOptions.options.length=0; for (var j=7; j<=8; j++){ addOption(document.frm_info.s_location, loc[j], j); } for (j=0; j < locOptions.options.length; j++){ if(locOptions.options[j].value == ''){ locOptions.options[j].selected = true; } } grandTotal = ""; calcfinalAmount(grandTotal,500,13.50); }else if(document.getElementById('s_country').value == 5){ Obj11.style.visibility = 'hidden'; Obj11.style.display = 'none'; Obj21.style.visibility = 'visible'; Obj21.style.display = 'block'; Obj31.style.visibility = 'visible'; Obj31.style.display = 'block'; Obj41.style.visibility = 'hidden'; Obj41.style.display = 'none'; Obj61.style.visibility = 'hidden'; Obj61.style.display = 'none'; Obj91.style.visibility = 'hidden'; Obj91.style.display = 'none'; Obj101.style.visibility = 'hidden'; Obj101.style.display = 'none'; Objpaytype2.style.visibility = 'hidden'; Objpaytype2.style.display = 'none'; document.frm_info.s_country_other.value = ""; grandTotal = ""; calcfinalAmount(grandTotal,500,0.00); }else{ Obj11.style.visibility = 'hidden'; Obj11.style.display = 'none'; Obj21.style.visibility = 'hidden'; Obj21.style.display = 'none'; Obj31.style.visibility = 'hidden'; Obj31.style.display = 'none'; Obj41.style.visibility = 'hidden'; Obj41.style.display = 'none'; Obj61.style.visibility = 'hidden'; Obj61.style.display = 'none'; Obj91.style.visibility = 'hidden'; Obj91.style.display = 'none'; Obj101.style.visibility = 'hidden'; Obj101.style.display = 'none'; Objpaytype2.style.visibility = 'visible'; Objpaytype2.style.display = 'block'; } //this block is if the delivery address is different from the billing address. document.getElementById('billing_add1').value = ""; if(document.getElementById('billing_add2').checked){ showHideShip(0); if(document.getElementById('b_country').value == 1){ Obj61.style.visibility = 'hidden'; Obj61.style.display = 'none'; Obj71.style.visibility = 'hidden'; Obj71.style.display = 'none'; }else if(document.getElementById('b_country').value == 2){ Obj61.style.visibility = 'hidden'; Obj61.style.display = 'none'; Obj71.style.visibility = 'visible'; Obj71.style.display = 'block'; var locOptionsbill = document.frm_info.b_location; locOptionsbill.options.length=0; for (var i=2; i <=6; i++){ addOption(document.frm_info.b_location, loc[i], i); } for (i=0; i < locOptionsbill.options.length; i++){ if(locOptionsbill.options[i].value == ''){ locOptionsbill.options[i].selected = true; } } }else if(document.getElementById('b_country').value == 3){ Obj61.style.visibility = 'visible'; Obj61.style.display = 'block'; Obj71.style.visibility = 'hidden'; Obj71.style.display = 'none'; document.frm_info.b_country_other.value = ""; }else if(document.getElementById('b_country').value == 4){ Obj61.style.visibility = 'hidden'; Obj61.style.display = 'none'; Obj71.style.visibility = 'visible'; Obj71.style.display = 'block'; var locOptionsbill = document.frm_info.b_location; locOptionsbill.options.length=0; for (var j=7; j<=8; j++){ addOption(document.frm_info.b_location, loc[j], j); } for (j=0; j < locOptionsbill.options.length; j++){ if(locOptionsbill.options[j].value == ''){ locOptionsbill.options[j].selected = true; } } }else if(document.getElementById('b_country').value == 5){ Obj61.style.visibility = 'visible'; Obj61.style.display = 'block'; Obj71.style.visibility = 'hidden'; Obj71.style.display = 'none'; document.frm_info.b_country_other.value = ""; }else{ var temp = ""; if(temp){ showHideShip(1); Obj61.style.visibility = 'hidden'; Obj61.style.display = 'none'; Obj71.style.visibility = 'hidden'; Obj71.style.display = 'none'; } } } // var frmObj = document.frm_info; // var ajaxVar = new ajaxVars(); // ajaxVar.vars['action'] = "runFunction"; // ajaxVar.vars['func'] = "setCountry"; // ajaxVar.vars['s_country'] = ; // // ajaxVar.vars['to'] = frmObj.email.value; // // ajaxVar.vars['to'] = "juliet@lizard.sapna"; // ajaxVar.gotoFunction = 'showmailResponse'; // ajaxVar.AjaxPostSQL(); } function getDesignerDrop(seasonId){ // alert(seasonId); } function getTry(cId){ // alert(cId); } function preloadOff(loadId, mainId) { var loadtblObj = document.getElementById(loadId); var maintblObj = document.getElementById(mainId); loadtblObj.style.visibility = "hidden"; loadtblObj.style.display = "none"; maintblObj.style.visibility = "visible"; maintblObj.style.display = "block"; }