document.write("<form id='Questform' name='Questform' action='http://qna.indiaeducation.net/index.aspx' method='post'target='blank'><input id='AskQuestionTextBox' name='AskQuestionTextBox' type='hidden' /></form>");
function AskQuest() 
{if (document.getElementById('AskQuestion').value == '') { alert('Please Enter Question'); } else { 
document.getElementById('AskQuestionTextBox').value = document.getElementById('AskQuestion').value;document.Questform.submit();}}
function qnacount() {
    var maxlimit = 100;
    var fieldlen = document.getElementById('AskQuestion').value.length;
    var charleft = parseInt(maxlimit) - parseInt(fieldlen);
    document.getElementById('cntfield').value = charleft;
    if (charleft == 0) {
        document.getElementById('AskQuestion').value = document.getElementById('AskQuestion').value.substring(0, maxlimit);
        alert('You have reached the Max Limit');
    }
    else if (charleft < 0) {
        var charexceeds = parseInt(fieldlen) - parseInt(maxlimit);
        document.getElementById('cntfield').value = "0";
        document.getElementById('AskQuestion').value = document.getElementById('AskQuestion').value.substring(0, maxlimit);
        alert('You have ' + charexceeds + ' chars exceeds');
    }}
function updatenews(cat)
{$("#latest_news").append("<img title='Please Wait..' src='http://indiaeducation.net/img/load.gif' style='float:right;margin-top:-70px;'"); 
if(document.domain=="indiaeducation.net" || document.domain=="www.indiaeducation.net")
{$.ajax({
        type: "POST",
        contentType: "application/json; charset=utf-8",
        url: "http://"+document.domain+"/searchservice.asmx/News",
        data: "{ category: '"+cat[cat.selectedIndex].value+"', para2: '', para3:''}",
        dataType: "json",
        success: function(data) {
            $("#latest_news").empty();
            var out = data.d;
            if (out == 'fail' || out.length < 10) {

            }
            else {
                $("#latest_news").empty();
                $("#latest_news").append(out);
            }
        },
        failure: function(msg) {
            alert("Please Try Next Time Your Request Has Not Been Completed");
        }
    });    
}   
else
{ xmlnewshttp = GetXmlHttpObject();
var url = "http://" + document.domain + "/assistant.aspx?news=" + cat[cat.selectedIndex].value;
xmlnewshttp.onreadystatechange = NewsChanged;
xmlnewshttp.open("GET", url, true);
xmlnewshttp.send(null);
}}
function NewsChanged() {
   if (xmlnewshttp.readyState == 4) {
       var Response = xmlnewshttp.responseText;
       if (xmlnewshttp.status == 200) {
                $("#latest_news").empty();
                $("#latest_news").append(Response);
       }
       else {
                $("#latest_news").empty();
                $("#latest_news").append("Page Not Found");
}}}
function institues() {
document.getElementById('institues').style.visibility = "visible";document.getElementById('news').style.visibility = "hidden";document.getElementById('update').style.visibility = "hidden";document.getElementById('sitesearch').style.visibility = "hidden";document.getElementById('institues').style.display = "block";document.getElementById('news').style.display = "none";document.getElementById('update').style.display = "none";document.getElementById('sitesearch').style.display = "none";document.getElementById('arr1').className = "ie_h_s_top_ul_s_arrow";document.getElementById('institues1').style.fontWeight = "bold";document.getElementById('news1').style.fontWeight = "normal";document.getElementById('update1').style.fontWeight = "normal";document.getElementById('sitesearch1').style.fontWeight = "normal";}
function news() {document.getElementById('news').style.visibility = "visible";document.getElementById('institues').style.visibility = "hidden";document.getElementById('update').style.visibility = "hidden";document.getElementById('sitesearch').style.visibility = "hidden";document.getElementById('news').style.display = "block";document.getElementById('institues').style.display = "none";document.getElementById('update').style.display = "none";document.getElementById('sitesearch').style.display = "none";document.getElementById('arr1').className = "ie_h_s_top_ul_s_arrow3";document.getElementById('news1').style.fontWeight = "bold";document.getElementById('institues1').style.fontWeight = "normal";document.getElementById('update1').style.fontWeight = "normal";document.getElementById('sitesearch1').style.fontWeight = "normal";}
function update() {document.getElementById('update').style.visibility = "visible";document.getElementById('institues').style.visibility = "hidden";document.getElementById('news').style.visibility = "hidden";document.getElementById('sitesearch').style.visibility = "hidden";document.getElementById('update').style.display = "block";document.getElementById('news').style.display = "none";document.getElementById('institues').style.display = "none";document.getElementById('sitesearch').style.display = "none";document.getElementById('arr1').className = "ie_h_s_top_ul_s_arrow4";document.getElementById('update1').style.fontWeight = "bold";document.getElementById('institues1').style.fontWeight = "normal";document.getElementById('news1').style.fontWeight = "normal";document.getElementById('sitesearch1').style.fontWeight = "normal";}
function sitesearch() {document.getElementById('sitesearch').style.visibility = "visible";document.getElementById('institues').style.visibility = "hidden";document.getElementById('news').style.visibility = "hidden";document.getElementById('update').style.visibility = "hidden";document.getElementById('sitesearch').style.display = "block";document.getElementById('update').style.display = "none";document.getElementById('news').style.display = "none";document.getElementById('institues').style.display = "none";document.getElementById('arr1').className = "ie_h_s_top_ul_s_arrow7";document.getElementById('sitesearch1').style.fontWeight = "bold";document.getElementById('institues1').style.fontWeight = "normal";document.getElementById('news1').style.fontWeight = "normal";document.getElementById('update1').style.fontWeight = "normal";}
function show_hide(){
if (document.getElementById("advance_search").style.display=="block")
{document.getElementById("advance_search").style.display="none";
document.getElementById("advance_div").style.background="url(http://indiaeducation.net/img/edu_images.png) -72px -2px no-repeat";	}else{
document.getElementById("advance_search").style.display="block";
document.getElementById("advance_div").style.background="url(http://indiaeducation.net/img/edu_images.png) -3px -2px no-repeat";
}}
//function upd_news() {document.getElementById('upd_news1').style.background="url(http://indiaeducation.net/img/edu_images.png) -42px -43px no-repeat";document.getElementById('upd_alerts1').style.backgroundImage= "none";document.getElementById('upd_news1').style.fontWeight= "bold";document.getElementById('upd_alerts1').style.fontWeight= "normal";document.getElementById('upd_news').style.visibility = "visible";document.getElementById('upd_alerts').style.visibility = "hidden";}
//function upd_alerts() {document.getElementById('upd_alerts1').style.background="url(http://indiaeducation.net/img/edu_images.png) -86px -43px no-repeat";document.getElementById('upd_news1').style.backgroundImage= "none";document.getElementById('upd_alerts1').style.fontWeight= "bold";document.getElementById('upd_news1').style.fontWeight= "normal";document.getElementById('upd_alerts').style.visibility = "visible";document.getElementById('upd_news').style.visibility = "hidden";}

function upd_news() {document.getElementById('upd_news1').style.background = "url(http://indiaeducation.net/img/edu_images.png) -42px -43px no-repeat";document.getElementById('upd_alerts1').style.backgroundImage = "none";document.getElementById('upd_articles1').style.background = "none";
    document.getElementById('upd_news1').style.fontWeight = "bold"; document.getElementById('upd_alerts1').style.fontWeight = "normal";
   document.getElementById('upd_articles1').style.fontWeight = "normal";document.getElementById('upd_news').style.visibility = "visible";  document.getElementById('upd_alerts').style.visibility = "hidden";document.getElementById('upd_articles').style.visibility = "hidden";}
function upd_alerts() {document.getElementById('upd_alerts1').style.background = "url(http://indiaeducation.net/img/edu_images.png) -86px -43px no-repeat";document.getElementById('upd_news1').style.backgroundImage = "none";document.getElementById('upd_articles1').style.background = "none";
    document.getElementById('upd_alerts1').style.fontWeight = "bold"; document.getElementById('upd_news1').style.fontWeight = "normal";
    document.getElementById('upd_articles1').style.fontWeight = "normal";document.getElementById('upd_alerts').style.visibility = "visible";
    document.getElementById('upd_news').style.visibility = "hidden";document.getElementById('upd_articles').style.visibility = "hidden";}
function upd_articles() { document.getElementById('upd_articles1').style.background = "url(http://indiaeducation.net/img/edu_images.png) -226px -43px no-repeat";document.getElementById('upd_news1').style.backgroundImage = "none";document.getElementById('upd_alerts1').style.backgroundImage = "none";document.getElementById('upd_articles1').style.fontWeight = "bold";document.getElementById('upd_alerts1').style.fontWeight = "normal";
    document.getElementById('upd_news1').style.fontWeight = "normal"; document.getElementById('upd_articles').style.visibility = "visible";
    document.getElementById('upd_alerts').style.visibility = "hidden";document.getElementById('upd_news').style.visibility = "hidden";}

function out(){
var t=0;
var IE = document.all?true:false;
if (!IE) {document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;}
else {document.onclick = getMouseXY;}
var tempX = 0;var tempY = 0;
function getMouseXY(e) {
	if (IE) {tempX = event.clientX + document.body.scrollLeft;tempY = event.clientY + document.body.scrollTop;}
	else { tempX = e.pageX;tempY = e.pageY;}  
	if (tempX < 0){tempX = 0;}
	if (tempY < 0){tempY = 0;}  
	tempX;
	tempY;
	var x=document.getElementById("wrapper").offsetLeft;var y=document.getElementById("wrapper").offsetTop;
	var a=x+305;
	var b=y+226;
	if(tempX < x || tempY < y || tempX > a || tempY > b)
	{t=setTimeout('check()',300)}
	else
	{clearTimeout(t);}
return true;}}
function check()
{   stop_fade();stop_fade_w();document.getElementById('1').style.display='none';document.getElementById('2').style.display='none';document.getElementById('3').style.display='none';document.getElementById('4').style.display='none';document.getElementById('5').style.display='none';document.getElementById('6').style.display='none';	document.getElementById('edu').className='mypets edu';document.getElementById('art').className='mypets art';document.getElementById('shp').className='mypets shp';document.getElementById('fest').className='mypets fest';document.getElementById('spor').className='mypets spor';document.getElementById('foru').className='mypets foru';}  
ddaccordion.init({
	headerclass: "mypets", 
	contentclass: "thepet", 
	revealtype: "mouseover", 
	mouseoverdelay: 300,
	collapseprev: true, 
	defaultexpanded: [], 
	onemustopen: false, 
	animatedefault: true, 
	persiststate: false, 
	toggleclass: ["", "openpet"],
	togglehtml: ["none", "", ""], 
	animatespeed: "fast",
	oninit:function(expandedindices){ 
	},
	onopenclose:function(header, index, state, isuseractivated){ start_fade();start_fade_w();}
})
ddaccordion.init({
	headerclass: "technology", 
	contentclass: "thelanguage",
	revealtype: "click",
	mouseoverdelay: 300,
	collapseprev: false,
	defaultexpanded: [],
	onemustopen: false,
	animatedefault: false,
	persiststate: false,
	toggleclass: ["closedlanguage", "openlanguage"],
	togglehtml: ["prefix", "<img src='http://i13.tinypic.com/80mxwlz.gif' style='width:13px; height:13px' /> ", "<img src='http://i18.tinypic.com/6tpc4td.gif' style='width:13px; height:13px' /> "],
	animatespeed: "fast",
	oninit:function(expandedindices){
},
	onopenclose:function(header, index, state, isuseractivated){ 
	}
})
ddaccordion.init({
	headerclass: "myheader",
	contentclass: "mycontent",
	revealtype: "click",
	collapseprev: true,
	defaultexpanded: [0],
	onemustopen: true,
	animatedefault: false,
	persiststate: false,
	toggleclass: ["", ""],
	togglehtml: ["src", "minus.gif", "plus.gif"],
	animatespeed: "fast",
	oninit:function(expandedindices){ 
	},
	onopenclose:function(header, index, state, isuseractivated){ 
	}
})
    function sunsign() {if (document.getElementById("sun-sign").style.display == "block") {document.getElementById("sun-sign").style.display = "none";document.getElementById("img_sun").style.background = "transparent url(http://indiaeducation.net/img/edu_images.png) no-repeat scroll -367px -399px";}else {document.getElementById("sun-sign").style.display = "block";document.getElementById("img_sun").style.background = "transparent url(http://indiaeducation.net/img/edu_images.png) no-repeat scroll -367px -414px";}}
    function go(url) {var a;
        for (i = 1; i < 6; i++) {if (document.getElementById("p" + i) != null) {if (document.getElementById("p" + i).checked == true)a = document.getElementById("p" + i).value; } }if (a != undefined) {window.location.href = "poll/" + url + "/" + a;}else {   alert('Please select option'); }}
    function go1(url) {var b;
        for (i = 6; i < 11; i++) {if (document.getElementById("p" + i) != null) {
                if (document.getElementById("p" + i).checked == true)
                    b = document.getElementById("p" + i).value;}}
        if (b != undefined) {window.location.href = "poll/" + url + "/" + b;  }
        else { alert('Please select option');} }
    function conlogin() {a = confirm("You have to login first");
        if (a) {centerPopup('LoginLayer');loadPopup('LoginLayer');}
        else
            return false;}
    function UpdateProgress(Progress, Button, Control) {Button.disabled = true;
        Button.src = 'http://indiaeducation.net/img/fade-button.gif';Progress.style.display = "";Control.disabled = true;
        setTimeout('Wait("' + Progress.id + '","' + Button.id + '")', 1);}
    var FadeButton = new Image();
    FadeButton.src = "http://indiaeducation.net/img/fade-button.gif";
    function Wait(Progress, Button) {
        Progress = document.getElementById(Progress);
        Button = document.getElementById(Button);
        if (Progress.style.display != "none") {setTimeout('Wait("' + Progress.id + '","' + Button.id + '")', 0);}
        else {Button.src = 'http://indiaeducation.net/img/search.gif';Button.disabled = false;}}
    function news_validate() {if (document.getElementById("keywords").value == "") {alert("Please enter some word or phrase");document.getElementById("keywords").focus();return false;} else {document.getElementById("frm_news").submit();}}
    function exam_validate() {document.getElementById("exam_frm").submit();}
           function sunsign1() {document.getElementById("whatsnew").style.left = parseInt(document.getElementById("main-p").offsetLeft) + parseInt(1) + "px";document.getElementById("whatsnew").style.top = parseInt(document.getElementById("main-p").offsetTop) + parseInt(10) + "px";document.getElementById("whatsnew").style.display = "block";}
           function CatMainValidate() {if (document.getElementById("CategoryList").selectedIndex == 0) {alert("Please select a main category!");document.getElementById("CategoryList").focus();return false;}
               if (document.getElementById("SubCategory" + document.form_s4i.CategoryList.selectedIndex).selectedIndex == 0) {alert("Please select a sub category!");document.getElementById("SubCategory" + document.form_s4i.CategoryList.selectedIndex).focus();return false;}return PostMain("top");}
           function SubCatMain() {for (i = 0; i <= 15; i++) {if (i == document.form_s4i.CategoryList.selectedIndex) {document.getElementById("SubCategory" + i).style.display = "";}
                       else {document.getElementById("SubCategory" + i).style.display = "none";}}}
			function CatValidates4i() {if (document.getElementById("Categorys4i").selectedIndex == 0) {alert("Please select a main category!");document.getElementById("Categorys4i").focus();return false;}
               if (document.getElementById("Subs4i" + document.getElementById("Categorys4i").selectedIndex).selectedIndex == 0) {alert("Please select a sub category!");document.getElementById("Subs4i" + document.getElementById("Categorys4i").selectedIndex).focus();return false;}return PostMain("bottom");}     
            function ChangeSubCatss4i() {for (i = 0; i <= 15; i++) {if (i == document.getElementById("Categorys4i").selectedIndex) {document.getElementById("Subs4i" + i).style.display = "";}
                       else {document.getElementById("Subs4i" + i).style.display = "none";}}}
           function PostMain(val) {if(val=="top"){document.form_s4i.main_cat.value = document.getElementById("CategoryList").value;document.form_s4i.sub_cat.value = document.getElementById("SubCategory" + document.form_s4i.CategoryList.selectedIndex).value;}
           else{document.form_s4i.main_cat.value = document.getElementById("Categorys4i").value;document.form_s4i.sub_cat.value = document.getElementById("Subs4i" + document.getElementById("Categorys4i").selectedIndex).value;}document.form_s4i.target = "_blank";document.form_s4i.submit();return false;}
           function Search(val) {document.getElementById("loading").style.visibility = "visible";getsearch(val);}
           function Search_callBack() {document.getElementById("Search_assist1").style.visibility = "visible";document.getElementById("Search_assist1").style.display = "block";document.getElementById("loading").style.visibility = "hidden";}
           document.onclick = hideDiv;
           function hideDiv(e) {var div = document.getElementById('Search_assist1');var target = e ? e.target : event.srcElement;target != div ? div.style.visibility = 'hidden' : null;target != div ? div.style.display = 'none' : null;}
           function getsearch(text) {xmlhttp = GetXmlHttpObject();var url = "http://" + document.domain + "/assistant.aspx?text=" + text;xmlhttp.onreadystatechange = SearchStateChanged;xmlhttp.open("GET", url, true);xmlhttp.send(null);}
           function SearchStateChanged() {if (xmlhttp.readyState == 4) {var Response = xmlhttp.responseText;if (xmlhttp.status == 200) {document.getElementById("Search_assist1").innerHTML = Response;}else {document.getElementById("Search_assist1").innerHTML = "Page Not Found.";}Search_callBack(); }}
           function GetXmlHttpObject() {if (window.XMLHttpRequest) {
                   return new XMLHttpRequest();}
               if (window.ActiveXObject) {return new ActiveXObject("Microsoft.XMLHTTP");}
               alert("Your browser does not support AJAX!");
               return;}
    var pre;var mytimer = new Array();
    function fadeind(val,len) {
        if (pre == undefined) {
            pre = val;
            $('#li' + 1).fadeOut(); $('#li' + val).fadeIn();
        }
        else {
            $('#li' + pre).fadeOut(); $('#li' + val).fadeIn();pre=val;
        }
        if ((val + 1) > len) val = 1; else val = val + 1;
        mytimer[mytimer.length+1] = setTimeout("fadeind("+val+","+len+")",4000);
    }    
    function stop_fade(){for(i=0;i<mytimer.length;i++)
	clearTimeout(mytimer[i]);} 
    function stop_fade_w(){for(iw=0;iw<mytimerw.length;iw++)
    clearTimeout(mytimerw[iw]);} 
    function start_fade()
    {stop_fade();
    var len=0;
    if(document.getElementById("1").style.display == "block")
        {for(k=1;k<=20;k++)
        {if(document.getElementById("li"+k))
            len = len + 1;
        }fadeind(1,len);}}  
function start_fade_w()
    {stop_fade_w();
    var lenw=0;
    if(document.getElementById("1").style.display == "block")
        {for(k=1;k<=10;k++)
        { if(document.getElementById("wi"+k))
            lenw = lenw + 1;
        }fadeindw(1,lenw);}}  
    var prew;var mytimerw = new Array();
    function fadeindw(valw,lenw) {
        if (prew == undefined) {
            prew = valw;
            $('#wi' + 1).fadeOut(); $('#wi' + valw).fadeIn();
        }
        else {$('#wi' + prew).fadeOut(); $('#wi' + valw).fadeIn();prew=valw;}
        if ((valw + 1) > lenw) valw = 1; else valw = valw + 1;
        mytimerw[mytimerw.length+1] = setTimeout("fadeindw("+valw+","+lenw+")",4000);
    }      
    function findPosX(objx) { var curleft = 0; objx = document.getElementById(objx); if (objx.offsetParent) { while (1) { curleft += objx.offsetLeft; if (!objx.offsetParent) { break; } objx = objx.offsetParent; } } else if (objx.x) { curleft += objx.x; return curleft; } return curleft; }
    function findPosY(objx) { var curTop = 0; objx = document.getElementById(objx); if (objx.offsetParent) { while (1) { curTop += objx.offsetTop; if (!objx.offsetParent) { break; } objx = objx.offsetParent; } } else if (objx.x) { curTop += objx.x; return curTop; } return curTop; }
function edu_overdiv(para,did){document.getElementById("edu_div_inner").innerHTML = para;document.getElementById("edu_div").style.visibility = "visible";document.getElementById("edu_div").style.display = "block";document.getElementById("edu_div").style.left = findPosX(did)+40 + "px";document.getElementById("edu_div").style.top = findPosY(did)+35 +"px";}
function edu_outdiv(){document.getElementById("edu_div").style.visibility = "hidden";document.getElementById("edu_div").style.display = "none";}
function search_pal(){a = document.getElementById("ser_pal").value;
if(a!="" && a!="Search Pals")
document.location = "http://www.edupal.in/Search/Profile/?Name="+a.replace(" ","-");
else
alert('Please enter pal name');}
function search_group(){a = document.getElementById("ser_group").value;
if(a!="" && a!="Search Groups")
document.location = "http://www.edupal.in/Search/Group/?Name="+a.replace(" ","-");
else
alert('Please enter group name');}
function postwhiteboard(email){if(document.getElementById("comment").value=="" || document.getElementById("comment").value=="What's on your mind...")
{alert('Enter some comments.');}
else{document.getElementById("edupal_email").value = email;document.form1.action = "http://www.edupal.in/postwhiteboard.aspx";document.form1.onsubmit = "";document.form1.submit();}}
function postfocus(flag)
{if(flag=="1"){ if(document.getElementById("comment").value=="What's on your mind...")document.getElementById("comment").value=""; }
else{ if(document.getElementById("comment").value=="")
        document.getElementById("comment").value="What's on your mind..."; }}
function se_g(flag)
{if(flag=="1"){if(document.getElementById("ser_group").value=="Search Groups")
        document.getElementById("ser_group").value="";}
else {if(document.getElementById("ser_group").value=="")
        document.getElementById("ser_group").value="Search Groups";}}
function sea_focus(flag)
{if(flag=="1"){if(document.getElementById("ser_pal").value=="Search Pals")
        document.getElementById("ser_pal").value="";}
else {if(document.getElementById("ser_pal").value=="")
        document.getElementById("ser_pal").value="Search Pals";}}
function Search_DefaultButton(event) 
{if (event.keyCode == 13){search_pal();}}
function Search_Group_DefaultButton(event) 
{if (event.keyCode == 13){search_group();}}
function PostWall_DefaultButton(event,email) 
{if (event.keyCode == 13){postwhiteboard(email);}}
function option1() {document.getElementById('dropmenu9').style.visibility = 'visible';}
function setHomepage()
{if (document.all){document.body.style.behavior='url(#default#homepage)';document.body.setHomePage('http://www.indiaeducation.net');
}else if (window.sidebar)
{if(window.netscape) {
try{ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");}  
catch(e)
{alert("this action was aviod by your browser,if you want to enable,please enter about:config in your address line,and change the value of signed.applets.codebase_principal_support to true"); }} 
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
    prefs.setCharPref('browser.startup.homepage', 'http://www.indiaeducation.net');}}
var popupStatus = 0;
function loadPopup(Layer) {
    if (popupStatus == 0) {
        $("#" + Layer).fadeIn("slow");
        popupStatus = 1;
        centerPopup(Layer);}}
function disablePopup(Layer) {
    if (popupStatus == 1) {
        $("#" + Layer).fadeOut("slow");
        popupStatus = 0;}}
function centerPopup(Layer) {
    var windowWidth = document.documentElement.clientWidth;
    var windowHeight = document.documentElement.clientHeight;
    var popupHeight = $("#" + Layer).height();
    var popupWidth = $("#" + Layer).width();}
function CloseLocationPanel() {disablePopup("LocationLayer");}
