var errorColor="rgb(250, 171, 132)";var regColor="#ffffff";var reqText="required";var invalText="invalid";var selText="select an option";var j=0;function isValidReturn(a){if(a==false){$("#ValidMsg").show()}else{$("#ValidMsg").hide()}}$(document).ready(function(){$("input:text, textarea").blur(fnValidateInput);$("a.mandatory").focus(fnValidateSelection);$("div.jqTransformSelectWrapper").find("ul li a").click(function(){var a=false;if($(this).parents("div.jqTransformSelectWrapper div").hasClass("bubbleholder")){a=true}if($(this).parent().parent().prevAll("div").find("a").hasClass("mandatory")){if($(this).html()=="- Select -"){if(a==false){$(this).parents("div.jqTransformSelectWrapper").wrapInner("<div class='bubbleholder'></div>");$(this).parent().parent().before("<div class='bubble' style='display:none;'><div>"+selText+"</div></div>")}$(this).parent().parent().prev("div.bubble").css("right","0px");$(this).parent().parent().prev("div.bubble").css("top","-29px");$(this).parent().parent().prev("div.bubble").animate({opacity:"show"},"slow")}else{$(this).parent().parent().prev("div.bubble").animate({opacity:"hide"},"slow")}}})});function validate(){j=0;$("input:text, textarea").each(fnValidateInput);$("a.mandatory").each(fnValidateSelection);if($("#captchaValue").val()==""){if($("#captchaValue").parent().attr("class")!="bubbleholder"){$("#captchaValue").parent().wrapInner("<div class='bubbleholder'></div>");$("#captchaValue").after("<div class='bubble'><div style=''>"+reqText+"</div></div>")}$("#captchaValue").next("div.bubble").css("right","39px");$("#captchaValue").next("div.bubble").css("top","8px");$("#captchaValue").next("div.bubble").animate({opacity:"show"},"slow");j=j+1}if(j!=0){isValidReturn(false);return false}else{return true}}function fnValidateInput(){var b=$(this).hasClass("mandatory");var f=$(this).hasClass("mandatoryE");if(f==true){var d=$(this).attr("id");var c=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;var a=$(this).val();if(c.test(a)==false){if($(this).parent().attr("class")!="bubbleholder"){$(this).parent().wrapInner("<div class='bubbleholder'></div>");$(this).after("<div class='bubble'><div>"+invalText+"</div></div>")}var e=$(this).css("width");$(this).next("div.bubble").css("right","0px");$(this).next("div.bubble").css("top","-29px");$(this).next("div.bubble").stop(true,true).animate({opacity:"show"},"slow");j=j+1}else{$(this).next("div.bubble").stop(true,true).animate({opacity:"hide"},"slow")}}else{if((b==true)&&($(this).val()=="")){if($(this).parent().attr("class")!="bubbleholder"){$(this).parent().wrapInner("<div class='bubbleholder'></div>");$(this).after("<div class='bubble'><div>"+reqText+"</div></div>")}var e=$(this).css("width");$(this).next("div.bubble").css("right","0px");$(this).next("div.bubble").css("top","-29px");$(this).next("div.bubble").stop(true,true).animate({opacity:"show"},"slow");j=j+1}else{$(this).next("div.bubble").stop(true,true).animate({opacity:"hide"},"slow")}}}function fnValidateSelection(){if($(this).prev("span").html()=="- Select -"){if($(this).parent().parent().attr("class")!="bubbleholder"){$(this).parent().parent().wrapInner("<div class='bubbleholder'></div>");$(this).parent().after("<div class='bubble' style='display:none;'><div>"+selText+"</div></div>")}$(this).parent().next("div.bubble").css("right","0px");$(this).parent().next("div.bubble").css("top","-29px");$(this).parent().next("div.bubble").animate({opacity:"show"},"slow");j=j+1}else{$(this).parent().next("div.bubble").animate({opacity:"hide"},"slow")}};
