// JavaScript Document // val1 to val22 variables used for refer id from framed site /************************************************** *** For the dealer_showroom page **************************************************/ /* function search_sort_showroom_up(){ alert('here'); alert("lifestyle_search_result.php?odd=y&id="+StrType+"&zip="+StrSel+"&mode="+StrMode); document.frm.action="lifestyle_search_result.html?odd=y&id="+StrType+"&zip="+StrSel+"&mode="+StrMode; document.frm.submit(); } function search_sort_showroom_down(){ document.frm.cboDisplay_up.value=document.frm.cboDisplay_down.value; search_sort_showroom_up(StrType,StrSel,StrMode); } */ function search_sort_showroom_up(dealer_id){ // alert("lifestyle_search_result.php?odd=y&id="+StrType+"&zip="+StrSel+"&mode="+StrMode); // document.frm.action="lifestyle_search_result.php?odd=y&id="+StrType+"&zip="+StrSel+"&mode="+StrMode; var val1 = ''; /*This code for framed carpizza site*/ if(val1==""){ document.frm.action="dealer_showroom.html?id="+dealer_id; }else{ document.frm.action="dealer_showroom.html?id="+dealer_id+"&refer_id="+val1; } //document.frm.action="dealer_showroom.php?id="+dealer_id; document.frm.submit(); } function search_sort_showroom_down(dealer_id){ document.frm.cboDisplay_up.value=document.frm.cboDisplay_down.value; search_sort_showroom_up(dealer_id); // StrType,StrSel,StrMode } function Display_sort_showroom_up(dealer_id) { var val2 = ''; /*This code for framed carpizza site*/ if(val2==""){ document.frm.action="dealer_showroom.html?id="+dealer_id; }else{ document.frm.action="dealer_showroom.html?id="+dealer_id+"&refer_id="+val2; } //document.frm.action="dealer_showroom.php?id="+dealer_id; document.frm.submit(); } function Display_sort_showroom_down(dealer_id) { document.frm.cboDisplay_up.value=document.frm.cboDisplay_down.value; Display_sort_showroom_up(dealer_id); } function validate_modelsearch() { if(trim(document.mm_frm.txtZip.value)=="Enter zip"){ alert("Please enter zip"); return false; } else if(trim(document.mm_frm.txtZip.value)==""){ alert("Please enter zip"); document.mm_frm.txtZip.focus(); return false; } else{ var val3 = ''; /*This code for framed carpizza site*/ if(val3==""){ document.mm_frm.action="mm_results_in.html?mode=mm_search"; }else{ document.mm_frm.action="mm_results_in.html?mode=mm_search&refer_id="+val3; } //document.frm.action="mm_results_in.php?mode=mm_search"; document.mm_frm.submit(); } } function validate_lifestylesearch() { if(trim(document.l_search.txtlifeZip.value)=="Enter zip"){ alert("Please enter zip"); return false; } else if(trim(document.l_search.txtlifeZip.value)==""){ alert("Please enter zip"); document.l_search.txtlifeZip.focus(); return false; } else{ var val4 = ''; /*This code for framed carpizza site*/ if(val4==""){ document.l_search.action="lifestyle_search.html?mode=lifestyle_search_in"; }else{ document.l_search.action="lifestyle_search.html?mode=lifestyle_search_in&refer_id="+val4; } //document.l_search.action="lifestyle_search.php?mode=lifestyle_search_in"; document.l_search.submit(); } } function validate_Fpsearch() { if(trim(document.f_search.txtfpZip.value)=="Enter zip"){ alert("Please enter zip"); return false; } else if(trim(document.f_search.txtfpZip.value)==""){ alert("Please enter zip"); document.f_search.txtfpZip.focus(); return false; } else{ var val5 = ''; /*This code for framed carpizza site*/ if(val5==""){ document.f_search.action="basic_fpsearch.html?mode=fpsearchIn"; }else{ document.f_search.action="basic_fpsearch.html?mode=fpsearchIn&refer_id="+val5; } //document.f_search.action="basic_fpsearch.php?mode=fpsearchIn"; document.f_search.submit(); } } function search(type) { var flag=false; for(var i=0; i document.frm.year_to.value) { alert("Invalid year range"); return false; } else if(isNaN(document.frm.txtzipCode.value)==true) { alert("Please enter valid zip."); document.frm.txtzipCode.focus(); return false; } else if(document.frm.txtzipCode.value !="" && document.frm.cbodistance.value=="") { alert("Please select distance."); document.frm.cbodistance.focus(); return false; } else { var val8 = ''; /*This code for framed carpizza site*/ if(val8==""){ document.frm.action="mm_search_result.html"; }else{ document.frm.action="mm_search_result.html?refer_id="+val8; } //document.frm.action="mm_search_result.php"; document.frm.submit(); } } function fetch_sale(strtype) { if(document.frm.car_year_from.value == "") { alert("Please select year"); document.frm.car_year_from.focus(); return false; } else if(document.frm.car_year_to.value =="") { alert("Please select year"); document.frm.car_year_to.focus(); return false; } else if(document.frm.car_year_from.value > document.frm.car_year_to.value) { alert("Invalid year range"); return false; } else { var val9 = ''; /*This code for framed carpizza site*/ if(val9==""){ document.frm.action="basic_fpresult.html?search="+strtype; }else{ document.frm.action="basic_fpresult.html?search="+strtype+"&refer_id="+val9; } //document.frm.action="basic_fpresult.php?search="+strtype; document.frm.submit(); } } function advance_search(strType) { if(document.frm.year_from_car.value == "") { alert("Please select year"); document.frm.year_from_car.focus(); return false; } else if(document.frm.year_to_car.value =="") { alert("Please select year"); document.frm.year_to_car.focus(); return false; } else if(document.frm.year_from_car.value > document.frm.year_to_car.value) { alert("Invalid year range"); return false; } else if(trim(document.frm.txtminWidth.value)!="" && isNaN(document.frm.txtminWidth.value)==true) { alert("Please enter valid Number."); document.frm.txtminWidth.focus(); return false; } else if(trim(document.frm.txtmaxWidth.value)!="" && isNaN(document.frm.txtmaxWidth.value)==true) { alert("Please enter valid number."); document.frm.txtmaxWidth.focus(); return false; } else if(trim(document.frm.txtminWidth.value)!="" && trim(document.frm.txtmaxWidth.value)=="" ) { alert("Please enter Maximum value"); document.frm.txtmaxWidth.focus(); return false; } else if(trim(document.frm.txtminWidth.value)=="" && trim(document.frm.txtmaxWidth.value)!="" ) { alert("Please enter Minimum value"); document.frm.txtminWidth.focus(); return false; } else if(trim(parseInt(document.frm.txtminWidth.value)) > trim(parseInt(document.frm.txtmaxWidth.value))) { alert("Please enter valid range"); document.frm.txtmaxWidth.focus(); return false; } else if(trim(document.frm.txtminHeight.value)!="" && isNaN(document.frm.txtminHeight.value)==true) { alert("Please enter valid Number."); document.frm.txtminHeight.focus(); return false; } else if(trim(document.frm.txtmaxHeight.value)!="" && isNaN(document.frm.txtmaxHeight.value)==true) { alert("Please enter valid Number."); document.frm.txtmaxHeight.focus(); return false; } else if(trim(document.frm.txtminHeight.value)!="" && trim(document.frm.txtmaxHeight.value)=="" ) { alert("Please enter Maximum value"); document.frm.txtmaxHeight.focus(); return false; } else if(trim(document.frm.txtminHeight.value)=="" && trim(document.frm.txtmaxHeight.value)!="" ) { alert("Please enter Minimum value"); document.frm.txtminWidth.focus(); return false; } else if(trim(parseInt(document.frm.txtminHeight.value)) > trim(parseInt(document.frm.txtmaxHeight.value))) { alert("Please enter valid range"); document.frm.txtminWidth.focus(); return false; } else if(trim(document.frm.txtminLength.value)!="" && isNaN(document.frm.txtminLength.value)==true) { alert("Please enter valid Number."); document.frm.txtminLength.focus(); return false; } else if(trim(document.frm.txtmaxLength.value)!="" && isNaN(document.frm.txtmaxLength.value)==true) { alert("Please enter valid Number."); document.frm.txtmaxLength.focus(); return false; } else if(trim(document.frm.txtminLength.value)!="" && trim(document.frm.txtmaxLength.value)=="" ) { alert("Please enter Maximum value"); document.frm.txtmaxLength.focus(); return false; } else if(trim(document.frm.txtminLength.value)=="" && trim(document.frm.txtmaxLength.value)!="" ) { alert("Please enter Minimum value"); document.frm.txtminLength.focus(); return false; } else if(trim(parseInt(document.frm.txtminLength.value)) > trim(parseInt(document.frm.txtmaxLength.value))) { alert("Please enter valid range"); document.frm.txtmaxLength.focus(); return false; } else if(trim(document.frm.txtFrontLegroomMinWidth.value)!="" && isNaN(document.frm.txtFrontLegroomMinWidth.value)==true) { alert("Please enter valid Number."); document.frm.txtFrontLegroomMinWidth.focus(); return false; } else if(trim(document.frm.txtFrontLegroomMaxWidth.value)!="" && isNaN(document.frm.txtFrontLegroomMaxWidth.value)==true) { alert("Please enter valid number."); document.frm.txtFrontLegroomMaxWidth.focus(); return false; } else if(trim(document.frm.txtFrontLegroomMinWidth.value)!="" && trim(document.frm.txtFrontLegroomMaxWidth.value)=="" ) { alert("Please enter Maximum value"); document.frm.txtFrontLegroomMaxWidth.focus(); return false; } else if(trim(document.frm.txtFrontLegroomMinWidth.value)=="" && trim(document.frm.txtFrontLegroomMaxWidth.value)!="" ) { alert("Please enter Minimum value"); document.frm.txtFrontLegroomMinWidth.focus(); return false; } else if(trim(parseInt(document.frm.txtFrontLegroomMinWidth.value)) > trim(parseInt(document.frm.txtFrontLegroomMaxWidth.value))) { alert("Please enter valid range"); document.frm.txtFrontLegroomMaxWidth.focus(); return false; } else if(trim(document.frm.txtFrontHeadroomMinWidth.value)!="" && isNaN(document.frm.txtFrontHeadroomMinWidth.value)==true) { alert("Please enter valid Number."); document.frm.txtFrontHeadroomMinWidth.focus(); return false; } else if(trim(document.frm.txtFrontHeadroomMaxWidth.value)!="" && isNaN(document.frm.txtFrontHeadroomMaxWidth.value)==true) { alert("Please enter valid number."); document.frm.txtFrontHeadroomMaxWidth.focus(); return false; } else if(trim(document.frm.txtFrontHeadroomMinWidth.value)!="" && trim(document.frm.txtFrontHeadroomMaxWidth.value)=="" ) { alert("Please enter Maximum value"); document.frm.txtFrontHeadroomMaxWidth.focus(); return false; } else if(trim(document.frm.txtFrontHeadroomMinWidth.value)=="" && trim(document.frm.txtFrontHeadroomMaxWidth.value)!="" ) { alert("Please enter Minimum value"); document.frm.txtFrontHeadroomMinWidth.focus(); return false; } else if(trim(parseInt(document.frm.txtFrontHeadroomMinWidth.value)) > trim(parseInt(document.frm.txtFrontHeadroomMaxWidth.value))) { alert("Please enter valid range"); document.frm.txtFrontHeadroomMaxWidth.focus(); return false; } else if(trim(document.frm.txtRearLegroomMinWidth.value)!="" && isNaN(document.frm.txtRearLegroomMinWidth.value)==true) { alert("Please enter valid Number."); document.frm.txtRearLegroomMinWidth.focus(); return false; } else if(trim(document.frm.txtRearLegroomMaxWidth.value)!="" && isNaN(document.frm.txtRearLegroomMaxWidth.value)==true) { alert("Please enter valid number."); document.frm.txtRearLegroomMaxWidth.focus(); return false; } else if(trim(document.frm.txtRearLegroomMinWidth.value)!="" && trim(document.frm.txtRearLegroomMaxWidth.value)=="" ) { alert("Please enter Maximum value"); document.frm.txtRearLegroomMaxWidth.focus(); return false; } else if(trim(document.frm.txtRearLegroomMinWidth.value)=="" && trim(document.frm.txtRearLegroomMaxWidth.value)!="" ) { alert("Please enter Minimum value"); document.frm.txtRearLegroomMinWidth.focus(); return false; } else if(trim(parseInt(document.frm.txtRearLegroomMinWidth.value)) > trim(parseInt(document.frm.txtRearLegroomMaxWidth.value))) { alert("Please enter valid range"); document.frm.txtRearLegroomMaxWidth.focus(); return false; } else if(trim(document.frm.txtRearHeadroomMinWidth.value)!="" && isNaN(document.frm.txtRearHeadroomMinWidth.value)==true) { alert("Please enter valid Number."); document.frm.txtRearHeadroomMinWidth.focus(); return false; } else if(trim(document.frm.txtRearHeadroomMaxWidth.value)!="" && isNaN(document.frm.txtRearHeadroomMaxWidth.value)==true) { alert("Please enter valid number."); document.frm.txtRearHeadroomMaxWidth.focus(); return false; } else if(trim(document.frm.txtRearHeadroomMinWidth.value)!="" && trim(document.frm.txtRearHeadroomMaxWidth.value)=="" ) { alert("Please enter Maximum value"); document.frm.txtRearHeadroomMaxWidth.focus(); return false; } else if(trim(document.frm.txtRearHeadroomMinWidth.value)=="" && trim(document.frm.txtRearHeadroomMaxWidth.value)!="" ) { alert("Please enter Minimum value"); document.frm.txtRearHeadroomMinWidth.focus(); return false; } else if(trim(parseInt(document.frm.txtRearHeadroomMinWidth.value)) > trim(parseInt(document.frm.txtRearHeadroomMaxWidth.value))) { alert("Please enter valid range"); document.frm.txtRearHeadroomMaxWidth.focus(); return false; } else if(trim(document.frm.cbohorsepower_min.value)!="" && trim(document.frm.cbohorsepower_max.value)=="") { alert("Please enter Maximum value"); document.frm.cbohorsepower_max.focus(); return false; } else if(trim(document.frm.cbohorsepower_max.value)!="" && trim(document.frm.cbohorsepower_min.value)=="") { alert("Please enter Minimum value"); document.frm.cbohorsepower_min.focus(); return false; } else if((parseInt(document.frm.cbohorsepower_min.value)) > (parseInt(document.frm.cbohorsepower_max.value))) { //alert("1"); alert("Please enter valid range"); return false; } else if(trim(document.frm.cbotorque_min.value)!="" && trim(document.frm.cbotorque_max.value)=="") { alert("Please enter Maximum value"); document.frm.cbotorque_max.focus(); return false; } else if(trim(document.frm.cbotorque_max.value)!="" && trim(document.frm.cbotorque_min.value)=="") { alert("Please enter Minimum value"); document.frm.cbotorque_min.focus(); return false; } else if((parseInt(document.frm.cbotorque_min.value)) > (parseInt(document.frm.cbotorque_max.value))) { //alert("2"); alert("Please enter valid range"); return false; } else { var val10 = ''; /*This code for framed carpizza site*/ if(val10==""){ document.frm.action="advance_fpresult.html?search="+strType; }else{ document.frm.action="advance_fpresult.html?search="+strType+"&refer_id="+val10; } //document.frm.action="advance_fpresult.php?search="+strType; document.frm.submit(); } } function do_submit_cust() { if(trim(document.frm.txtname.value)=="") { alert("Please enter name"); document.frm.txtname.focus(); return false; } if(trim(document.frm.txtpass.value)=="") { alert("Please enter password"); document.frm.txtpass.focus(); return false; } if(trim(document.frm.txtcpass.value)=="") { alert("Please confirm password"); document.frm.txtcpass.focus(); return false; } if((trim(document.frm.txtcpass.value)) != (trim(document.frm.txtpass.value))) { alert("Password mismatch."); document.frm.txtcpass.focus(); return false; } if(trim(document.frm.txtphone.value)=="") { alert("Please enter phone number"); document.frm.txtphone.focus(); return false; } if(isNumeric()==false) { alert("Please enter valid phone number"); document.frm.txtphone.focus(); return false; } if(trim(document.frm.txtstreet.value)=="") { alert("Please enter street"); document.frm.txtstreet.focus(); return false; } if(trim(document.frm.txtcity.value)=="") { alert("Please enter city"); document.frm.txtcity.focus(); return false; } if(trim(document.frm.txtstate.value)=="") { alert("Please enter state"); document.frm.txtstate.focus(); return false; } } function imagechange(str,strH) { //alert(strH); document.getElementById("hiddenimages").innerHTML=""; } function seller_con() { if(validateEmail(document.frm.txtTo.value,1,1)==false) { document.frm.txtTo.focus(); return false; } if(validateEmail(document.frm.txtFrom.value,1,1)==false) { document.frm.txtFrom.focus(); return false; } if(trim(document.frm.txtSubject.value)=="") { alert("please enter subject."); document.frm.txtSubject.focus(); return false; } if(trim(document.frm.txtContent.value)=="") { alert("Please enter content"); document.frm.txtContent.focus(); return false; } } function SellerContactForm() { if(trim(document.frm.txtFname.value)==""){ alert("Please enter first name."); document.frm.txtFname.focus(); return false; } if(trim(document.frm.txtLname.value)==""){ alert("Please enter first name."); document.frm.txtLname.focus(); return false; } if(validateEmail(document.frm.txtemail.value,1,1)==false){ document.frm.txtemail.focus(); return false; } if(trim(document.frm.txtSubject.value)==""){ alert("please enter subject."); document.frm.txtSubject.focus(); return false; } if(trim(document.frm.txtContent.value)==""){ alert("Please enter content"); document.frm.txtContent.focus(); return false; } } function ContactFriend(){ if(validateEmail(document.frm.txtFmail.value,1,1)==false){ document.frm.txtFmail.focus(); return false; } if(validateEmail(document.frm.txtMmail.value,1,1)==false){ document.frm.txtMmail.focus(); return false; } if(trim(document.frm.txtname.value)==""){ alert("please enter name."); document.frm.txtname.focus(); return false; } if(trim(document.frm.txtSubject.value)==""){ alert("please enter subject."); document.frm.txtSubject.focus(); return false; } if(trim(document.frm.txtContent.value)==""){ alert("Please enter content"); document.frm.txtContent.focus(); return false; } } function open_win_sel(strID, strType, strMode, strcar, strimg, strmul) { var filename="seller_contact.html?owner="+strID+","+strType+","+strMode+","+strcar+","+strimg+","+strmul; window.open(filename,'helpvin','width=450,height=345,top=20,left=40,scrollbars=yes'); } function open_win_sel1(strID,strType,strMode,strcar,strimg,strmul) { var filename="friend_contact.html?owner="+strID+","+strType+","+strMode+","+strcar+","+strimg+","+strmul; window.open(filename,'helpvin1','width=450,height=490,top=20,left=40,scrollbars=yes'); } function open_win_sel2(strID, strType, strMode, strcarid) { var filename="contact_seller_form.html?owner="+strID+","+strType+","+strMode+","+strcarid; window.open(filename,'helpvin2','width=450,height=440,top=20,left=40,scrollbars=yes'); } function open_win_sel3(strID,CarID) { var filename="direction_map.html?map=click&car_id="+CarID+"&owner="+strID; window.open(filename,'helpvin2','width=660,height=400,top=20,left=40,scrollbars=yes'); } function textCounter1(field,cntfield,maxlimit) { if (field.value.length > maxlimit) // if too long...trim it! { field.value = field.value.substring(0, maxlimit); } else // otherwise, update 'characters left' counter { cntfield.value = maxlimit - field.value.length; } } function save_item(strUser, strType, strMode) { var flag = false; var val = ""; if(strUser == "") { alert("You need to log in to access this feature."); return false; } else { for(var i=0; i5){ alert("You can compare maximum five cars"); flag1=false; return false; } if(flag1==true) { document.frm.ids.value=val; if(StrMode=="manufacture"){ var file="view_comparison.html?ids="+val; window.open(file,'selcomp','width=720,height=415,top=20,left=40,scrollbars=yes'); } else{ if(StrPage=="basic"){ var file="view_comparison_sale.html?ids="+val; window.open(file,'selwiew1','width=720,height=415,top=20,left=40,scrollbars=yes'); } else if(StrPage=="life"){ var file="view_comparison_sale.html?ids="+val; window.open(file,'selwiew2','width=720,height=415,top=20,left=40,scrollbars=yes'); } else{ var file="view_comparison_sale.html?ids="+val; window.open(file,'selwiew3','width=720,height=415,top=20,left=40,scrollbars=yes'); } } } } function search_sort_up(strMode,strAction) { if(strAction=="basic") { var val11 = ''; /*This code for framed carpizza site*/ if(val11==""){ document.frm.action="basic_fpresult.html?search="+strMode+"&odd=Y"; }else{ document.frm.action="basic_fpresult.html?search="+strMode+"&odd=Y&refer_id="+val11; } //document.frm.action="basic_fpresult.php?search="+strMode+"&odd=Y"; document.frm.submit(); } else { var val12 = ''; /*This code for framed carpizza site*/ if(val12==""){ document.frm.action="advance_fpresult.html?search="+strMode+"&odd=Y"; }else{ document.frm.action="advance_fpresult.html?search="+strMode+"&odd=Y&refer_id="+val12; } //document.frm.action="advance_fpresult.php?search="+strMode+"&odd=Y"; document.frm.submit(); } } function search_sort_down(strMode,strAction) { document.frm.cboSort_up.value=document.frm.cboSort_down.value; search_sort_up(strMode,strAction); } function Display_sort_up(strMode,strAction) { if(strAction=="basic") { var val13 = ''; /*This code for framed carpizza site*/ if(val13==""){ document.frm.action="basic_fpresult.html?search="+strMode+"&odd=Y"; }else{ document.frm.action="basic_fpresult.html?search="+strMode+"&odd=Y&refer_id="+val13; } //document.frm.action="basic_fpresult.php?search="+strMode+"&odd=Y"; document.frm.submit(); } else { var val14 = ''; /*This code for framed carpizza site*/ if(val14==""){ document.frm.action="advance_fpresult.html?search="+strMode+"&odd=Y"; }else{ document.frm.action="advance_fpresult.html?search="+strMode+"&odd=Y&refer_id="+val14; } //document.frm.action="advance_fpresult.php?search="+strMode+"&odd=Y"; document.frm.submit(); } } function Display_sort_down(strMode,strAction){ document.frm.cboDisplay_up.value=document.frm.cboDisplay_down.value; Display_sort_up(strMode,strAction); } function life_search_sort_up(StrType,StrSel,StrMode) { var val15 = ''; /*This code for framed carpizza site*/ if(val15==""){ document.frm.action="lifestyle_search_result.html?hdtype="+StrType+"&rdlifestyle="+StrSel+"&mode="+StrMode; }else{ document.frm.action="lifestyle_search_result.html?hdtype="+StrType+"&rdlifestyle="+StrSel+"&mode="+StrMode+"&refer_id="+val15; } //document.frm.action="lifestyle_search_result.php?hdtype="+StrType+"&rdlifestyle="+StrSel+"&mode="+StrMode; document.frm.submit(); } function life_search_sort_down(StrType,StrSel,StrMode) { document.frm.cboSort_up.value=document.frm.cboSort_down.value; life_search_sort_up(StrType,StrSel,StrMode); } function life_search_display_up(StrType,StrSel,StrMode){ var val16 = ''; /*This code for framed carpizza site*/ if(val16==""){ document.frm.action="lifestyle_search_result.html?hdtype="+StrType+"&rdlifestyle="+StrSel+"&mode="+StrMode; }else{ document.frm.action="lifestyle_search_result.html?hdtype="+StrType+"&rdlifestyle="+StrSel+"&mode="+StrMode+"&refer_id="+val16; } //document.frm.action="lifestyle_search_result.php?hdtype="+StrType+"&rdlifestyle="+StrSel+"&mode="+StrMode; document.frm.submit(); } function life_search_display_down(StrType,StrSel,StrMode){ document.frm.cboDisplay_up.value=document.frm.cboDisplay_down.value; life_search_sort_up(StrType,StrSel,StrMode); } function check_options(StrId,Strchekced) { var flag1=true; var flag=true; for(var i=0; i9){ alert("You have selected more than '9' images."); } else if(count==0){ alert("Please select image."); } else{ var file="preview.html?value="+strimage+"&year="+document.frm.cboyear.value; window.open(file,'','width=420,height=250,top=20,left=40,scrollbars=yes'); } } function blank_zip(strVal){ strVal.value=""; } function Myarea(strlogged){ if(strlogged==""){ alert("Please Login or Register to use My Area"); var val = ''; if(val==""){ document.location.href="index.html"; }else{ document.location.href="index.html?refer_id="+val; } return false; } } function SetImage(strID,strtype){ var filename="set_images.html?ID="+strID+"&TP="+strtype; window.open(filename,'img','width=530,height=350,top=20,left=40,scrollbars=yes'); } function SaveImage(StrOption){ if(CheckOptions(StrOption)==false){ alert("Please select image."); return false; } } function ForgotPassword(){ var filename="forgot_password.html"; window.open(filename,'','width=300,height=210,top=20,left=40,scrollbars=yes'); } function CheckEmail(){ if(validateEmail(document.frm.email.value,1,1)==false){ document.frm.email.focus(); return false; } } function PupulatingYear(stryear,strmode){ //alert(stryear.value); if(stryear.value==""){ alert("Please select year"); } else{ makeRequest('populate_year.php?year='+stryear.value+'&mode='+strmode,'alertContents_8'); } } function search_sort_model_up(){ var val17 = ''; /*This code for framed carpizza site*/ if(val17==""){ document.frm.action="mm_search_result.html?odd=Y"; }else{ document.frm.action="mm_search_result.html?odd=Y&refer_id="+val17; } //document.frm.action="mm_search_result.php?odd=Y"; document.frm.submit(); } function show_new_used(){ var val25 = ''; /*This code for framed carpizza site*/ if(val25==""){ document.frm.action="mm_search_result.html?odd=Y"; }else{ document.frm.action="mm_search_result.html?odd=Y&refer_id="+val17; } //document.frm.action="mm_search_result.php?odd=Y"; document.frm.submit(); } function search_sort_model_down(){ document.frm.cboSort_up.value=document.frm.cboSort_down.value; search_sort_model_up(); } function Display_sort_model_up(){ var val18 = ''; /*This code for framed carpizza site*/ if(val18==""){ document.frm.action="mm_search_result.html?odd=Y"; }else{ document.frm.action="mm_search_result.html?odd=Y&refer_id="+val18; } //document.frm.action="mm_search_result.php?odd=Y"; document.frm.submit(); } function Display_sort_model_down(){ document.frm.cboDisplay_up.value=document.frm.cboDisplay_down.value; Display_sort_model_up(); } //*********** For mm_result_in.php ********************** function search_sort_mm_up(){ var val19 = ''; /*This code for framed carpizza site*/ if(val19==""){ document.frm.action = "mm_results_in.html?mode=mm_search&odd=Y"; }else{ document.frm.action = "mm_results_in.html?mode=mm_search&odd=Y&refer_id="+val19; } //document.frm.action = "mm_results_in.php?mode=mm_search&odd=Y"; document.frm.submit(); } function search_show_condition(){ var val126 = ''; /*This code for framed carpizza site*/ if(val126==""){ document.frm.action = "mm_results_in.html?mode=mm_search&odd=Y"; }else{ document.frm.action = "mm_results_in.html?mode=mm_search&odd=Y&refer_id="+val26; } //document.frm.action = "mm_results_in.php?mode=mm_search&odd=Y"; document.frm.submit(); } function dealer_list_condition(){ var val127 = ''; /*This code for framed carpizza site*/ if(val127==""){ document.frm.action = "vehicles_listing.html"; }else{ document.frm.action = "vehicles_listing.html&refer_id="+val27; } document.frm.submit(); } function search_sort_mm_down(){ document.frm.cboSort_up.value = document.frm.cboSort_down.value; search_sort_mm_up(); } function Display_sort_mm_up(){ var val20 = ''; /*This code for framed carpizza site*/ if(val20==""){ document.frm.action="mm_results_in.html?mode=mm_search&odd=Y"; }else{ document.frm.action="mm_results_in.html?mode=mm_search&odd=Y&refer_id="+val20; } //document.frm.action="mm_results_in.php?mode=mm_search&odd=Y"; document.frm.submit(); } function Display_sort_mm_down(){ document.frm.cboDisplay_up.value=document.frm.cboDisplay_down.value; Display_sort_mm_up(); } //***************************************************************** //*********** For seller_oth_car.php ********************** function search_sort_seller_up(){ var val21 = ''; /*This code for framed carpizza site*/ if(val21==""){ document.frm.action = "seller_oth_car.html?odd=Y"; }else{ document.frm.action = "seller_oth_car.html?odd=Y&refer_id="+val21; } //document.frm.action = "seller_oth_car.php?odd=Y"; document.frm.submit(); } function search_sort_seller_down(){ document.frm.cboSort_up.value = document.frm.cboSort_down.value; search_sort_seller_up(); } function Display_sort_seller_up(){ var val22 = ''; /*This code for framed carpizza site*/ if(val22==""){ document.frm.action="seller_oth_car.html?odd=Y"; }else{ document.frm.action = "seller_oth_car.html?odd=Y&refer_id="+val22; } //document.frm.action="seller_oth_car.php?odd=Y"; document.frm.submit(); } function Display_sort_seller_down(){ document.frm.cboDisplay_up.value=document.frm.cboDisplay_down.value; Display_sort_seller_up(); } //***************************************************************** function ContactCarpizza(){ if(trim(document.frm.txtname.value)==""){ alert("Plese enter name."); document.frm.txtname.focus(); return false; } if(validateEmail(document.frm.txtmail.value,1,1)==false){ document.frm.txtmail.focus(); return false; } if(trim(document.frm.txtquestion.value)==""){ alert("Please write your query."); document.frm.txtquestion.focus(); return false; } } function open_win_terms(){ var filename="terms_condition.html"; window.open(filename,'terms','width=700,height=650,top=20,left=40,scrollbars=yes'); }