function anzeigen(A){var B="m"+A;document.getElementById(B).style.display="block"}function zumachen(B){var A="m"+B;document.getElementById(A).style.display="none"}function add_image_field(){theRow=document.getElementById("after_last_image_field");num=theRow.sectionRowIndex;theNewRow=theRow.parentNode.insertRow(theRow.sectionRowIndex);theNewRow.innerHTML=document.getElementById("image_field_ref1").innerHTML.replace(/normal1/g,"normal"+((num-1)/2+1));theNewRow.className="odd";theNewRow=theRow.parentNode.insertRow(theRow.sectionRowIndex);theNewRow.innerHTML=document.getElementById("image_field_ref2").innerHTML.replace(/normal1/g,"normal"+((num-1)/2+1));theNewRow.className="odd";return false}function add_video_field(){theRow=document.getElementById("after_last_video_field");num=theRow.sectionRowIndex;theNewRow=theRow.parentNode.insertRow(theRow.sectionRowIndex);theNewRow.innerHTML=document.getElementById("video_field_ref1").innerHTML.replace(/video1/g,"video"+((num-1)/2+1));theNewRow.className="odd";theNewRow=theRow.parentNode.insertRow(theRow.sectionRowIndex);theNewRow.innerHTML=document.getElementById("video_field_ref2").innerHTML.replace(/video1/g,"video"+((num-1)/2+1));theNewRow.className="odd";return false}function add_descr(D){var A=D.form.elements["descrs_selected[]"];var C=D.form.elements["descrs"];var B=new Option(C.options[C.selectedIndex].text,C.options[C.selectedIndex].value,false);A.options[A.options.length]=B;return false}function del_descr(B){var A=B.form.elements["descrs_selected[]"];for(a=0;a<A.options.length;a++){if(A.options[a].selected){A.options[a]=null}}return false}function prepare_submit(B){var A=B.elements["descrs_selected[]"];for(a=0;a<A.options.length;a++){A.options[a].selected=true}in_work(B.submit);return false}function start_all(A){if(document.getElementById("brand_id").value){ajax_addmodels("model_id",document.getElementById("brand_id").value,A)}}function check_end_time(A){if(document.getElementById("sales_process").value=="auction"){if(A){document.getElementById("m_change_information").style.display="inline"}document.getElementById("price_multi_tr").style.display="none";document.getElementById("price_sell_tr").style.display="none";document.getElementById("auction_start_tr").style.display="table-row";document.getElementById("auction_end_tr").style.display="table-row";document.getElementById("inspection_date_tr").style.display="table-row";document.getElementById("inspection_street_tr").style.display="table-row";document.getElementById("inspection_city_tr").style.display="table-row";document.getElementById("price_sell_now_tr").style.display="table-row";document.getElementById("agb_tr").style.display="table-row";document.getElementById("standard_price_information").style.display="none";document.getElementById("auction_price_information").style.display="inline"}else{document.getElementById("price_multi_tr").style.display="table-row";document.getElementById("price_sell_tr").style.display="table-row";document.getElementById("auction_start_tr").style.display="none";document.getElementById("auction_end_tr").style.display="none";document.getElementById("inspection_date_tr").style.display="none";document.getElementById("inspection_street_tr").style.display="none";document.getElementById("inspection_city_tr").style.display="none";document.getElementById("price_sell_now_tr").style.display="none";document.getElementById("agb_tr").style.display="none";document.getElementById("standard_price_information").style.display="inline";document.getElementById("auction_price_information").style.display="none"}}function check_history(){if(document.getElementById("history_list").style.display=="none"){document.getElementById("history_list").style.display="table-row"}else{document.getElementById("history_list").style.display="none"}}function check_history_email(){if(document.getElementById("history_list_email").style.display=="none"){document.getElementById("history_list_email").style.display="table-row"}else{document.getElementById("history_list_email").style.display="none"}}function check_inspection_div(A){if(A){document.getElementById("inspection_date_div").style.display="none"}else{document.getElementById("inspection_date_div").style.display="inline"}}function start_all_bm(A){if(document.form1.brand_id.value){ajax_addmodels("model_id",document.form1.brand_id.value,A)}}function add_year_field(){theRow=document.getElementById("after_last_year_field");num=theRow.sectionRowIndex;theNewRow=theRow.parentNode.insertRow(theRow.sectionRowIndex);newInnerHtml=document.getElementById("year_field_ref1").innerHTML.replace(/year1/g,"year"+(num-21));theNewRow.innerHTML=newInnerHtml.replace(/serial1/g,"serial"+(num-21));theNewRow.className="odd";return false}function set_all(){ajax_indsearch(document.form1.cat_id.value,document.form1.brand_id.value,document.form1.model_id.value)}function set_all_cats(){ajax_indsearch(document.form1.cat_id.value,document.form1.brand_id.value,document.form1.model_id.value,document.form1.size_id.value,document.form1.location_id.value,document.form1.year_id.value)}function set_all_mos(){ajax_indsearch(document.form1.cat_id.value,document.form1.brand_id.value,document.form1.model_id.value,document.form1.size_id.value,document.form1.location_id.value,document.form1.year_id.value)}function createMarker(A,C){var B=new GMarker(A);GEvent.addListener(B,"click",function(){B.openInfoWindowHtml(C)});return B}function setDirections(B,D,A,C){document.getElementById("directions"+C).style.display="table-cell";if(C==1){gdir1.load("from: "+B+" to: "+D,{"locale":A})}else{if(C==2){gdir2.load("from: "+B+" to: "+D,{"locale":A})}else{if(C==3){gdir3.load("from: "+B+" to: "+D,{"locale":A})}else{if(C==4){gdir4.load("from: "+B+" to: "+D,{"locale":A})}}}}}function handleErrors(){alert("{{t}}The way from your adress to us \nis not yet supported by Google Maps!{{/t}}")}function set_auction_table(A){if(A.checked==true){document.getElementById("auction_inf").style.display="table"}else{document.getElementById("auction_inf").style.display="none"}}function show_contact_form(A){document.getElementById("contact_id").value=A;document.getElementById("contact_form").style.display="inline"}function hide_contact_form(){document.getElementById("contact_form").style.display="none"}