/* Copyright 2008 Vumasco, LLC. All Rights Reserved. */
 function JFsubmitphone(JVcur_field, JVchar_max, JVnext_field) { if (JVcur_field.value.length == JVchar_max) { document.HNphone.submit(JVcur_field, JVnext_field) ; } } var JVisNN = (navigator.appName.indexOf("Netscape")!=-1); function JFautoTab(JVinput, JVlen, JVe) { var JVkeyCode = (JVisNN) ? JVe.which : JVe.keyCode; var JVfilter = (JVisNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46]; if(JVinput.value.length >= JVlen && !JFcontainsElement(JVfilter, JVkeyCode)) { JVinput.value = JVinput.value.slice(0, JVlen); JVinput.form[(JFgetIndex(JVinput)+1) % JVinput.form.length].focus(); } function JFcontainsElement(JVarr, JVele) { var JVfound = false, JVindex = 0; while(!JVfound && JVindex < JVarr.length) if(JVarr[JVindex] == JVele) JVfound = true; else JVindex++; return JVfound; } function JFgetIndex(JVinput) { var JVindex = -1, JVi = 0, JVfound = false; while (JVi < JVinput.form.length && JVindex == -1) { if (JVinput.form[JVi] == JVinput) JVindex = JVi; else JVi++; } return JVindex; } return true; } function JFalpha(JVphoneObj) { var JVj = document.getElementById(JVphoneObj); if (!JVj) {return; } JVk = JVj.value; for(JVi=0; JVi<JVk.length; JVi++) { if(JVk.charAt(JVi) >= '0' && JVk.charAt(JVi) <= '9') {} else { alert("Alpha Characters are not Allowed. Only Numeric Characters are Allowed."); return false; } } } function JFclosewindow() { setTimeout('window.close()',3000); } function JFattach_file(JVp_script_url) { var JVmyscript = document.createElement('script'); JVmyscript.src = JVp_script_url; document.getElementsByTagName('head')[0].appendChild(JVmyscript); } function JFUpdatePhoneImage(JVPhoneImg_url, JVPhone_ImgID) { if (document[JVPhone_ImgID]) { document[JVPhone_ImgID].src = JVPhoneImg_url; } } function JFupdate_phone_model() { var JVmyValue = null; var JVmy_phone_make = document.getElementById('HIphone_makeID'); var JVmy_phone_model = document.getElementById('HIphone_modelID'); var JVmy_phone_child = document.getElementById('HIphone_model_childID'); if (JVmy_phone_model && JVmy_phone_child && JVmy_phone_child.value) { JVmy_phone_model.value = JVmy_phone_child.value; JVmyValue = JVmy_phone_child.value; var JVImgObj = document.getElementById('HNPhone_Image'); if (JVmy_phone_make && JVImgObj) { var JVImgVal = JVImgObj.src; var temp = new Array(); temp = JVImgVal.split('?'); var JVUrlLocation = temp[0]; JFUpdatePhoneImage(JVUrlLocation + '?pmk=' + JVmy_phone_make.value + '&pmo=' + JVmy_phone_child.value, 'HNPhone_Image'); } }   } function JFdo_update(JVphone_model_selected) { var JVmy_phone_make = document.getElementById('HIphone_makeID'); JFattach_file('http://www.vietemusic.com/main/__js__/getphonemodels.js.php?phone_make=' + JVmy_phone_make.value + '&phone_model=' + JVphone_model_selected); return true; } 