// $Id: common.js.php,v 1.3 2010/01/21 05:21:29 mandar Exp $ function confirmDel(msgDel){ if(confirm(msgDel)) { return true; } return false; } //For open pop up window function openpopup (popurl) { var winpops = window.open(popurl,"","width=770,height=450,menubar=0,toolbar=0,scrollbars =1"); winpops.focus(); } function errorJS(){ window.location.href="/seller/item#top"; } function cancelJS(){ window.location.href="'.sfConfig::get('app_webpath').'"; } function depositJS(deposit_type){ if(deposit_type.value == "Y") document.getElementById("deposits").style.display="block"; else document.getElementById("deposits").style.display="none"; } function contactJS(contact_type){ if(contact_type.value == "N") document.getElementById("contact_inf").style.display="block"; else document.getElementById("contact_inf").style.display="none"; } function productAvaJS(prd_availabe){ if(prd_availabe.value == 2) document.getElementById("product_ava").style.display="block"; else document.getElementById("product_ava").style.display="none"; } function blockError(){return true;} window.onerror = blockError; function CategoryChanged(CONTROL){ return CONTROL.options[CONTROL.selectedIndex].value+",+"; } function loadSection(url,CONTROL) { var strTmp=CategoryChanged(CONTROL); var strTmp=strTmp.split(","); if(strTmp[0]==0) removeOptionAll("id_item_section") url=url+"/id/"+strTmp[0]; new Ajax.Request(url, {asynchronous:true, evalScripts:true, onComplete:function(request, json){updateJSON(request, json, 2, strTmp[1])}}); return false; } function addOption(objSelectNow,txt,val) { var objOption = document.createElement("OPTION"); objOption.text= txt; objOption.value=val; objSelectNow.options.add(objOption); } function addOptionGroup(selectId,optGroup) { var objSelect = document.getElementsByTagName("SELECT"); var objSelectNow = objSelect[selectId]; if (selectId=="id_item_category_add"){ objSelectNow.length = 1; } for (i=0; i