$(document).ready(function() { $("input[name=tselect_deselect]").click(function() { var checked_status = this.checked; $("input[alt=check]").each(function(){this.checked = checked_status;}); }); // ------- end toggle check boxes ------------- $(".tabbox").css("display","none"); var selectedTab; $(".vb_button").click(function() { var elid = $(this).attr("id"); $("#"+elid).removeClass("vb_button"); $("#"+elid).addClass("vb_current"); $(".tabbox").slideUp(); if (elid != selectedTab) { selectedTab = elid; $("#"+elid+"box").slideDown(); } else { selectedTab = null; $(".vb_current").addClass("vb_button"); } $("#tab").val(elid.substr(3)); }); }); // ----------------- jump menu ------------------------------------ function plugin_jumpMenu(targ,selObj,restore) { eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } // ----------------- validation ------------------------------------ function checkpassword(name) { var id="confirm_"+name; var first=document.getElementById(name);//plugin_form.password var second=document.getElementById(id);//plugin_form.password2 if(first.value!=second.value) { second.value=""; second.className="textfieldRequiredState"; first.className="textfieldRequiredState"; alert(""); } else { second.className="textfieldValidState"; first.className="textfieldValidState"; } } function plugin_validateForm() { if(document.getElementById) { var i,p,q,nm,field_value,empty,chip,title,label,test,num,min,max,errors="",args=plugin_validateForm.arguments; for(i=0; i<(args.length-2); i+=3) { test =args[i+2]; nm =args[i]; chip =nm.split("="); title =chip[0]; label =chip[1]; title =(title)?title:nm; label =(label)?label:title; val =document.getElementById(title); field_value=val.value; if(field_value!="") { if(test.indexOf("isEmail")!=-1) { p=field_value.indexOf("@"); if(p<1 || p==(field_value.length-1)) { errors+="- "+label+" .\n"; empty =1; } } else if(test!="R") { num = parseFloat(field_value); if(isNaN(field_value)) { errors+="- "+label+" .\n"; empty =1; } if(test.indexOf("inRange") != -1) //RinRange1-9 { p=test.indexOf("-"); min=test.substring(8,p); max=test.substring(p+1); if(num