var l1open=null,l2open=null;function onError(f,a,d,c){var b=f.responseText;if(b.Message){alert("() error "+b.Message)}}function ajaxcall(b,a){$.ajax({type:"POST",data:"{}",url:division===""?b:b+"&div="+division,contentType:"application/json; charset=utf-8",dataType:"json",success:function(d,c){a(d.d)},error:function(f,c,d){onError(f,c,d,"ajaxcall")}})}function login(){window.location.href="demo.aspx/login?uid="+$("#username>input").val()+"&pwd="+$("#password>input").val()}function openL2header(a){if(a!=l2open){$(l2open).next("div").slideUp(200)}$(a).next("div").fadeIn(600);l2open=a}$(document).ready(function(){if($.browser.msie){$("body>div:first-child").css("top","8px")}$(".l1content, .l2content").hide();$(".l1header").click(function(){if(l2open!==null){$(l2open).next("div").hide();l2open=null}if(this!=l1open){$(l1open).next("div").slideUp(200)}$(this).next("div").fadeIn(600);l1open=this;var a=$(this).next().children(":first-child");if(a.hasClass("l2header")){openL2header(a[0])}else{$("input:first",$(this).next()).focus()}});$(".l2header").click(function(){openL2header(this)});$(".l1header, .l2header, .demo").hover(function(){$(this).addClass("highlight")},function(){$(this).removeClass("highlight")});$(".demo").click(function(){window.location.href="demo.aspx?uid=demo&pwd=demo"});$("#cdiv").click(function(){$("#cack").hide();$("#cinfo").show()});$("#csendbtn").click(function(){$("#cinfo").hide();$("#cack").show();var a=encodeURI("n="+$("#cname input").val()+"&c="+$("#contact input").val()+"&m="+$("#cmsg").val())});$("#home").show();l1open=$("#homehdr")[0];$("#loginbtn").bind("click",login);$("#password").bind("keypress",function(a){if(a.keyCode==13){login()}});$("#username").bind("keypress",function(a){if(a.keyCode==13){$("#password input:first").focus()}})});
