function setCookie(B,D,A,F,C,E){document.cookie=B+"="+escape(D)+((A)?"; expires="+A.toGMTString():"")+((F)?"; path="+F:"")+((C)?"; domain="+C:"")+((E)?"; secure":"")}function setColor(A,B){A.style.color=B}function checkAvailabilityCallback(A,B){if(B.status=="failure"){document.getElementById(A).style.color="red";document.getElementById("alert").style.color="red";document.getElementById("alert").innerHTML=B.message}else{document.getElementById(A).style.color="green";document.getElementById("alert").style.color="green";document.getElementById("alert").innerHTML=B.message}}function showLoader(){var A='<img src="'+addContextPath("/images/ajax-loader-small.gif")+'" border="0" style="margin-top:5px;"/>';document.getElementById("alert").innerHTML=A}function setGradYear(){if(dur!=0){var B=document.getElementById("joiningYear").value;var C=parseInt(B)+parseInt(dur);var A=document.getElementById("graduationYear");A.value=C}}function disableEnterKey(D,B){var A;if(window.event){A=window.event.keyCode}else{A=D.which}if(A==13){var C=document.getElementById(B);if(C){C.click()}return false}else{return true}}function hideDiv(){var A=document.getElementById("fcDiv");A.style.visibility="hidden";A.style.display="none";document.getElementById("hiddenMsg").style.display="none"}function hideCDiv(){var B=document.getElementById("collegeDetailsDiv");B.className="hide";var A=document.getElementById("findCampusBtn");A.className="disp"}function hideWDiv(){var A=document.getElementById("fwcDiv");A.style.visibility="hidden";document.getElementById("hiddenWMsg").style.display="none"}function setCampus(G,C){var F="findCampusBtn";var D=document.getElementById("cType");C=D?D.value+"_":"";F=C+F;hideDiv();campusBox=document.getElementById("cbox");campusBox.value="";campusBox.value=unescape(G);var B=document.getElementById("collegeDetailsDiv");B.className="disp";B.style.display="block";var A=document.getElementById(F);A.className="hide";A.style.display="none";var E=document.getElementById("userDesc1");if(E){E.style.display="none"}getDegree(campusBox.value)}function getDepartments(){var C=document.getElementById("degree");var A=document.getElementById("cbox");var B=A.value;Minglebox.Request.process(null,null,addDepartments,null,addContextPath("/campussearch.do?method=departments&campus="+B+"&degree="+C.value),null,null)}function getDegree(A){Minglebox.Request.process(null,null,addDegrees,null,addContextPath("/campussearch.do?method=degrees&campus="+A),null,null)}var dur=0;function getYears(){var D=document.getElementById("degree");var B=document.getElementById("department");var A=document.getElementById("cbox");var C=A.value;Minglebox.Request.process(null,null,setYears,null,addContextPath("/campussearch.do?method=years&campus="+C+"&degree="+D.value+"&department="+B.value),null,null)}function setYears(A,B){dur=B.results[0][0].value}function removeAll(B){for(var A=B.options.length-1;A>=0;A--){B.remove(A)}}function addAll(D,F,B,E){var A=D.options.length;D.options[A]=new Option(F,"");for(var C=0;C<B.length;C++){A=D.options.length;D.options[A]=new Option(B[C][0].value,B[C][0].value)}if(E){A=D.options.length;D.options[A]=new Option("Other","-1")}}function addDepartments(B,C){var A=document.getElementById("department");if(C.results.length>0){removeAll(A);addAll(A,"Find your department",C.results,true)}}function addDegrees(A,B){var C=document.getElementById("degree");if(B.results.length>0){removeAll(C);addAll(C,"Find your degree",B.results)}}function comboTextSwap(dropDown,inputText){var val=eval("document.mbUserFormEx."+dropDown+".value");var han=eval("document.mbUserFormEx."+inputText);var dept=document.getElementById("otherD");if(val=="-1"){dept.style.display="block"}else{setGradYear();dept.style.display="none";han.value=""}}function setWork(D,C){hideWDiv();var A=document.getElementById("cwbox");A.value="";A.value=unescape(D);document.getElementById("hid").value=C;var B=document.getElementById("workDetailsDiv");B.style.display="block";document.mbUserFormEx.clearWorkBtn.style.display="block"}function showSearchInit(C,B,D){document.fcForm.query.value="type your college name";clearStuff();var A=document.getElementById("fcDiv");A.style.display="block";showComponent(C,"fcDiv");return true}function showWSearchInit(B,A,C){document.fwcForm.query.value="";clearWStuff();showComponent(B,"fwcDiv");return true}function campusWindowCallback(I,B){clearStuff();try{if(B.results.length>0){document.getElementById("hiddenMsg").style.display="block";for(var E=0;E<B.results.length;E++){div=document.createElement("p");optCampus=B.results[E][1].value;optCity=B.results[E][0].value;var K="<a href=\"javascript:setCampus('"+escape(escape(optCampus+":"+optCity))+"', '"+I+"')\">"+optCampus+", "+optCity+"</a>";div.innerHTML=K;document.getElementById("resultDiv").appendChild(div)}var D=parseInt(B.users[0][2].value);var C=parseInt(B.users[0][1].value);var H=parseInt(B.users[0][0].value);var A="<%=request.getContextPath()%>";if(D+C<H){var J=document.createElement("a");J.setAttribute("href","javascript:getNextCampuses("+D+")");J.innerHTML="Next";document.getElementById("nextDiv").appendChild(J)}if(D>0){var F=document.createElement("a");F.setAttribute("href","javascript:getPrevCampuses("+D+")");F.innerHTML="Prev";document.getElementById("prevDiv").appendChild(F)}}else{clearStuff();document.getElementById("hiddenMsg").style.display="none";document.getElementById("resultDiv").innerHTML='<span align="right">No Results Found</span>'}}catch(G){alert(G.message)}}function workCampusWindowCallback(L,C){clearWStuff();try{if(C.results.length>0){document.getElementById("hiddenWMsg").style.display="block";var G=document.getElementById("wresultDiv");for(var H=0;H<C.results.length;H++){var N=document.createElement("p");var D=C.results[H][0].value;var A=C.results[H][1].value;var O=C.results[H][2].value;N.innerHTML="<a href=\"javascript:setWork('"+escape(escape(A+":"+D))+"','"+O+"')\">"+A+", "+D+"</a>";G.appendChild(N)}var F=parseInt(C.users[0][2].value);var E=parseInt(C.users[0][1].value);var K=parseInt(C.users[0][0].value);var B="<%=request.getContextPath()%>";if(F+E<K){var M=document.createElement("a");M.setAttribute("href","javascript:getNextWorkCampuses("+F+")");M.innerHTML="Next";document.getElementById("nextWDiv").appendChild(M)}if(F>0){var I=document.createElement("a");I.setAttribute("href","javascript:getPrevWorkCampuses("+F+")");I.innerHTML="Prev";document.getElementById("prevWDiv").appendChild(I)}}else{clearWStuff();document.getElementById("hiddenWMsg").style.display="none";document.getElementById("wresultDiv").innerHTML='<span align="right">No Results Found</span>'}}catch(J){alert(J.message)}}function clearStuff(){document.getElementById("resultDiv").innerHTML="";document.getElementById("nextDiv").innerHTML="";document.getElementById("prevDiv").innerHTML=""}function clearWStuff(){document.getElementById("wresultDiv").innerHTML="";document.getElementById("nextWDiv").innerHTML="";document.getElementById("prevWDiv").innerHTML=""}function getNextCampuses(A){Minglebox.Request.process(null,null,campusWindowCallback,null,addContextPath("/campussearch.do?method=nextCampuses&offset="+A),"fcForm",null)}function getPrevCampuses(A){Minglebox.Request.process(null,null,campusWindowCallback,null,addContextPath("/campussearch.do?method=prevCampuses&offset="+A),"fcForm",null)}function getNextWCampuses(A){Minglebox.Request.process(null,null,workCampusWindowCallback,null,addContextPath("/campussearch.do?method=nextWorkCampuses&offset="+A),null,null)}function getPrevWCampuses(A){Minglebox.Request.process(null,null,workCampusWindowCallback,null,addContextPath("/campussearch.do?method=prevWorkCampuses&offset="+A),null,null)}function submitForm(){if(!document.mbUserFormEx.checkbox.checked){alert("Please accept the 'Terms of Service' & 'Privacy Policy' to continue with Sign-up");return false}document.mbUserFormEx.submit()}function clearCollege(D){D=D||"findCampusBtn";if(document.getElementById("cbox")){document.getElementById("cbox").value=""}var B=document.getElementById("collegeDetailsDiv");B.className="hide";B.style.display="none";var A=document.getElementById(D);A.className="disp";A.style.display="block";var C=document.getElementById("userDesc1");if(C){C.style.display="block"}}function clearWork(A){A.form.workNameAndCity.value="";A.style.display="none"}function saveUsername(B){var A=new Date();A.setTime(A.getTime()+24*30*60*60*1000);setCookie("j_username",B.j_username.value,A)}function messageCallback(A,B){if(B.status=="failure"){alert(B.message)}if(B.status=="success"){alert(B.message)}}function checkForm(){if(document.LoginForm.j_username.value==null||document.LoginForm.j_username.value==""){alert("Enter the Username/Email");return false}else{if(document.LoginForm.j_password.value==null||document.LoginForm.j_password.value==""){alert("Enter the password");return false}}return true}function clearForm(){alert("Iam calling reset method");document.LoginForm.j_username.value="";document.LoginForm.j_password.value="";return false}function setCookie(B,C,A){var D=new Date();D.setDate(D.getDate()+A);document.cookie=B+"="+escape(C)+((A==null)?"":";expires="+D)}function displayStandardMsg(A){var B=document.getElementById("ajaxMessages");var C=document.createElement("div");B.appendChild(C);if(C){C.className="promptDiv";C.innerHTML="<label color='green'>"+A+"</label>";C.style.visibility="visible"}}var bCheckNumbers=true;var bCheckUpperCase=true;var bCheckLowerCase=true;var bCheckPunctuation=true;var nPasswordLifetime=365;function checkPassword(C){nCombinations=0;if(bCheckNumbers){strCheck="0123456789";if(doesContain(C,strCheck)>0){nCombinations+=strCheck.length}}if(bCheckUpperCase){strCheck="ABCDEFGHIJKLMNOPQRSTUVWXYZ";if(doesContain(C,strCheck)>0){nCombinations+=strCheck.length}}if(bCheckLowerCase){strCheck="abcdefghijklmnopqrstuvwxyz";if(doesContain(C,strCheck)>0){nCombinations+=strCheck.length}}if(bCheckPunctuation){strCheck=";:-_=+|//?^&!.@$ÃÂ¯ÃÂ¿ÃÂ½#*()%~<>{}[]";if(doesContain(C,strCheck)>0){nCombinations+=strCheck.length}}var B=((Math.pow(nCombinations,C.length)/500)/2)/86400;var A=B/nPasswordLifetime;return A}function runPassword(D,B){alert("ss");nPerc=checkPassword(D);var A=document.getElementById(B+"_bar");var C=document.getElementById(B+"_text");if(!A||!C){return }var E=Math.round(nPerc*100);if(E<(D.length*5)){E+=D.length*5}if(E>100){E=100}A.style.width=E+"%";if(E>95){strText="Very Secure";strColor="#3bce08"}else{if(E>75){strText="Secure";strColor="orange"}else{if(E>50){strText="Mediocre";strColor="#ffd801"}else{strColor="red";strText="Insecure"}}}A.style.backgroundColor=strColor;C.innerHTML="<span style='color: "+strColor+";'>"+strText+"</span>"}function doesContain(B,A){nCount=0;for(i=0;i<B.length;i++){if(A.indexOf(B.charAt(i))>-1){nCount++}}return nCount}function checkCollegebtn(){if(document.getElementById("collegeDetailsDiv").className=="disp"){document.getElementById("findCampusBtn").className="hide"}}function showRUpload(){if(document.mbUserFormEx.jobs.checked){document.getElementById("fileSpan").style.display="block"}else{document.getElementById("fileSpan").style.display="none"}}function onUserDescChange(){var C=document.mbUserFormEx.userDesc.value;var B=document.mbUserFormEx.collegeNameAndCity.value;var A=document.getElementById("school");if(C=="Working at a company"){document.getElementById("working").style.display="block";document.getElementById("findCampusBtn").style.display="none";if(A){A.style.display="none"}document.getElementById("collegeDetailsDiv").style.display="none"}else{if(C=="Studying in college"){document.getElementById("working").style.display="none";document.getElementById("findCampusBtn").style.display="block";if(A){A.style.display="none"}}else{if(C=="a school student"){if(A){A.style.display="block"}document.getElementById("working").style.display="none";document.getElementById("findCampusBtn").style.display="none"}else{document.getElementById("working").style.display="none";document.getElementById("findCampusBtn").style.display="none";if(A){A.style.display="none"}}}}}function function1(){var C=document.mbUserFormEx.educationinterest.value;if(C=="Study Abroad"){document.mbUserFormEx.preferredLocation.options.length=0;document.mbUserFormEx.preferredLocation.options[0]=new Option("Study in USA","studyusa",false,false);document.mbUserFormEx.preferredLocation.options[1]=new Option("Study in UK","studyuk",false,false);document.mbUserFormEx.preferredLocation.options[2]=new Option("Study in Australia","studyaustralia",false,false);document.mbUserFormEx.preferredLocation.options[3]=new Option("Study in Singapore","studysingapore",false,false)}else{document.mbUserFormEx.preferredLocation.options.length=0;var A=Array("Preferred location for Higher Education","Bangalore","Chennai","Delhi","Hyderabad","Kolkata","Mumbai","Pune","Agra","Agraharam","Ahmedabad","Ahmednagar","Aizawl","Ajmer","Aligarh","Allahabad","Alwar","Ambala","Amravati","Anantapur","AndhraPradesh","Aurangabad","Badnera","Bagalkot","Balasore","Banda","Barabanki","Baramati","Bareilly","Belgaum","Bellary","Bengaluru/bangalore","Bhalki","Bhavnagar","Bhimavaram","Bhopal","Bhubaneshwar","Bhubaneswar","Bihar","Bijapur","Bijnor","Bikaner","Bilaspur","Bokaro","Buldana","Calcutta","Calicut","Chandigarh","Chandrapur","Chengalpattu","Chengannur","Chitrakoot","Chittoor","Chopda","Cochin","Coimbatore","Cuddapah","Cuttack","Darbhanga","Darjeeling","Dehradun","Dhanbad","Dharmapuri","Dharwad","Dhule","Dindigul","Durgapur","Eluru","Erode","Faridabad","Gandhinagar","Ganjam","Gargaon","GautamBudhNagar","Gaya","Ghaziabad","Goa","Goa-Other","Gondia","GreaterNoida","Guhawati","Gujarat-Other","Guntur","Gurgaon","Guwahati","Guwhati","Gwalior","Haridwar","Harihar","Haryana-Other","Hassan","rHimachalPradesh-Other","Himayatnagar","Hindupur","Hisar","Hyderabad/Secunderabad","Ichalkaranji","Imphal","Inchal","IndiaDelhi","IndiaNagpur","Indore","Jabalpur","Jagadhri","Jaipur","Jalandhar","Jalgaon","Jammu","Jammu&Kashmir-Other","Jamshedpur","Jaunpur","Jhansi","Jodhpur","Kakinada","Kalavakkam","Kanchipuram","Kanpur","Karad","Karaikudi","Karimnagar","Karnal","Karnataka","Kerala-Other","Khammam","Khandala","Kharagpur","Kilakarai","Kochi","Kodaikanal","Kolar","Kolhapur","Kota","Kottayam","Krishna","Kurukshetra","Lakshmangarh","Latur","Loni","Lucknow","Ludhiana","Madras","Madurai","Maharashtra","Mahboobnagar","Mangalore","Manipal","Mathura","Meerut","Meghalaya-Other","Mehsana","Miraj","Mizoram-Other","Modinagar","Moga","Mohali","Moradabad","MumbaiSuburbs","Muzaffarnagar","Muzaffarpur","Mysore","Nadiad","Nagaland-Other","Nagpur","Namakkal","Nanded","Nandyal","Nashik","Nasik","NaviMumbai","Nellore","Nizamabad","Noida","Ooty","Orissa-Other","Palakkad","Panchkula","Patan","Patiala","Patna","Periyar","Perundurai","Pollachi","Pondicherry","Punjab","Puri","Raipur","Rajahmundry","Rajasthan","Ramtek","Ranchi","Rayagada","Rayavaram","Rewa","Ribandar","Rohtak","Roorkee","Rourkela","Sagar","Sahib","Salem","Samastipur","Sambalpur","Sangli","Satara","Secunderabad","Shegaon","Shimla","Shimoga","Shrirampur","Sikar","Sikkim-Other","Sindhudurg","Sirsa","Sivakasi","Solapur","Sonepat","Srikakulam","Srinagar","Tambaram","TamilNadu","Tezpur","Thane","Thanjavur","Thiruvallur","Thiruvalluvar","Thiruvananthapuram","Tiruchengode","Tiruchirapalli","Tiruchirappalli","Tiruninravur","Tirupati","Trichy","Trivandrum","Tumkur","Udaipur","Ujire","Ujjain","UttarPradesh-Other","Uttaranchal-Other","Vadodara","VallabhVidyanagar","Vapi","Varanasi","Vellore","Vijayawada","Virudhunagar","Visakhapatnam","Warangal","Wardha","WestBengal-Other","YamunaNagar","Yamunanagar","Yavatmal");for(var B=0;B<A.length;B++){document.mbUserFormEx.preferredLocation.options[B]=new Option(A[B],A[B],false,false)}}}function showEducationInterest(){var A=document.mbUserFormEx.educationinterest.value;if(A=="Entrance Exam Preparation"){document.getElementById("entrance").style.display="block";document.getElementById("othercourse").style.display="none"}else{if(A=="Other Courses"){document.getElementById("entrance").style.display="none";document.getElementById("othercourse").style.display="block"}else{document.getElementById("entrance").style.display="none";document.getElementById("othercourse").style.display="none"}}}function showCoachingLocation(A){if(A=="true"){document.getElementById("coachingPref").style.display="block"}else{document.getElementById("coachingPref").style.display="none"}}function showExamFields(A,C){var B=document.mbUserFormEx.nationalExams[C].checked;if(B){document.getElementById(A).style.display="block"}else{document.getElementById(A).style.display="none"}};