
var pop; //create global variable without assigning a value so that its value is null

function SubscribeNewsLetter(){

if(pop!=null && !pop.closed){ // if popUp has been opened, and popUp hasn't already been closed
pop.close()	//close it in order to re-assign properties
}
var URL="http://www.indiaeducation.net/common/pop/newsletter.htm";
pop = window.open(URL,"subscribe","width="+576+",height="+528+",scrollbars=no,menubar=no,status=no,toolbar=no,resizable=no")
pop.focus() 
}  
    function PrintArticle()
    {
        var url;
        var str =document.URL;
        var url_check = str.search(".aspx");
        var alert_check = str.search("indiaeducation.net/Alerts");
        var www_check = str.search("www.");    
        if (url_check != -1)
        {
        str.replace("www.", "");
        url = str;
        }
        else
        {
        str.replace("www.", "");
        url = str+"index.aspx";
        }
        if (alert_check != -1)
        {
        window.open("http://www.indiaeducation.net/template/alert_template/CommonNNE/usercontrol/print.aspx?url=" + url, "myWindow", "height=700, width=731, menubar=no,toolbar=no,location=no,scrollbars=yes,resizable=yes");
        }
        else
        {
        window.open("http://www.indiaeducation.net/common/pop/print.aspx?url=" + url, "myWindow", "height=700, width=731, menubar=no,toolbar=no,location=no,scrollbars=yes,resizable=yes");
        }
    }
    
    function popmail()
    {
        var url =document.URL;
        window.open("http://www.indiaeducation.net/common/pop/Mailto.aspx?url=" + url, "myWindow", "height=700, width=731,menubar=no,toolbar=no,location=no,status=yes,scrollbars=yes,resizable=no");
    }
    
    function sendfeedback()
    {
        var url;
        var str =document.URL;
        var url_check = str.search(".aspx");
        var www_check = str.search("www.");
        if (url_check != -1)
        {
        str.replace("www.", "");
        url = str;
        }
        else
        {
        str.replace("www.", "");
        url = str+"index.aspx";
        }
        window.open("http://www.indiaeducation.net/common/pop/FeedbackForm.aspx?url=" + url, "FeedbackWindow", "height=490, width=420,menubar=no,toolbar=no,location=no,status=yes,scrollbars=yes,resizable=false");
    }
    
    function ChangeFontSize(Order)
    {
        var TheElement = document.getElementById("ctl00_ContentPlaceHolder1_Content");
        var FontSize = TheElement.style.fontSize;
            
        if ((FontSize == null) || (FontSize == ""))
        {
            if (Order == "Decrease")
            {
                TheElement.style.fontSize = "11px";
            }
            else
            {
                TheElement.style.fontSize = "13px";
            }
        }
        else
        {
            FontSize = parseInt(FontSize.replace("px", ""));            
            if (Order == "Decrease")
            {
                TheElement.style.fontSize = FontSize - 1 + "px";
            }
            else
            {
                TheElement.style.fontSize = FontSize + 1 + "px";
            }
        }
    }
	
    function Bookmark()
    {
        var url = document.URL;
        var title = document.title;
    
        if (window.sidebar) // Mozilla Firefox Bookmark 
        { 
            window.sidebar.addPanel(title, url,"");
        } 
        else if( window.external ) // IE Favorite
        { 
            window.external.AddFavorite( url, title); 
        }
        else
        {
            alert("This browser is not supported! Please press Ctrl+D to bookmark this page.");
        }
    }

// News Form Script -----------------------------------------------------

function NewsTabControl(num)
{
if(num==1)
{
document.getElementById('TabCtr_OneContentBlock_index_0').style["visibility"]="visible";
document.getElementById('TabCtr_OneContentBlock_index_0').style["display"]="block";
document.getElementById('TabCtr_OneContentBlock_index_1').style["visibility"]="hidden";
document.getElementById('TabCtr_OneContentBlock_index_1').style["display"]="none";
document.getElementById("NewsTabButton1").className = "NewsTabControlTabOptionActive";
document.getElementById("NewsTabButton2").className = "NewsTabControlTabOption";
}
else
{
document.getElementById('TabCtr_OneContentBlock_index_1').style["visibility"]="visible";
document.getElementById('TabCtr_OneContentBlock_index_1').style["display"]="block";
document.getElementById('TabCtr_OneContentBlock_index_0').style["visibility"]="hidden";
document.getElementById('TabCtr_OneContentBlock_index_0').style["display"]="none";
document.getElementById("NewsTabButton1").className = "NewsTabControlTabOption";
document.getElementById("NewsTabButton2").className = "NewsTabControlTabOptionActive";
}
}

// Feedback Form Script -----------------------------------------------------

function Expand()
{
var tope;
var lefte;
var topecon;
var leftecon;
    if(screen.width=='800')
    {
    tope = Math.round((parseInt(screen.height)*5)/100);
    lefte = Math.round((parseInt(screen.width)*25)/100);    
    topecon=-(Math.round((parseInt(screen.height)*4)/100));
    leftecon=Math.round((parseInt(screen.width)*51)/100);
    }
    else if(screen.width=='1024')
    {
    tope = Math.round((parseInt(screen.height)*5)/100);
    lefte = Math.round((parseInt(screen.width)*30)/100);    
    topecon=-(Math.round((parseInt(screen.height)*3)/100));
    leftecon=Math.round((parseInt(screen.width)*40)/100);
    }    
    else if(screen.width=='1152')
    {
    tope = Math.round((parseInt(screen.height)*5)/100);
    lefte = Math.round((parseInt(screen.width)*33)/100);    
    topecon=-(Math.round((parseInt(screen.height)*3)/100));
    leftecon=Math.round((parseInt(screen.width)*30)/100);
    }
    else if(screen.width=='1280')
    {
    tope = Math.round((parseInt(screen.height)*5)/100);
    lefte = Math.round((parseInt(screen.width)*35)/100);    
    topecon=-(Math.round((parseInt(screen.height)*3)/100));
    leftecon=Math.round((parseInt(screen.width)*22)/100);
    }
    else if(screen.width=='1400')
    {
    tope = Math.round((parseInt(screen.height)*15)/100);
    lefte = Math.round((parseInt(screen.width)*35)/100);    
    topecon=-(Math.round((parseInt(screen.height)*2.5)/100));
    leftecon=Math.round((parseInt(screen.width)*15.5)/100);
    }
    else if(screen.width=='1600')
    {
    tope = Math.round((parseInt(screen.height)*15)/100);
    lefte = Math.round((parseInt(screen.width)*35)/100);    
    topecon=-(Math.round((parseInt(screen.height)*2.5)/100));
    leftecon=Math.round((parseInt(screen.width)*7.5)/100);
    }
    else if(screen.width=='1856')
    {
    tope = Math.round((parseInt(screen.height)*15)/100);
    lefte = Math.round((parseInt(screen.width)*35)/100);    
    topecon=-(Math.round((parseInt(screen.height)*2)/100));
    leftecon=-(Math.round((parseInt(screen.width)*0.3)/100));
    }
    else if(screen.width=='1920')
    {
    tope = Math.round((parseInt(screen.height)*15)/100);
    lefte = Math.round((parseInt(screen.width)*40)/100);    
    topecon=-(Math.round((parseInt(screen.height)*2)/100));
    leftecon=-(Math.round((parseInt(screen.width)*2)/100));
    }
    else if(screen.width=='2048')
    {
    tope = Math.round((parseInt(screen.height)*15)/100);
    lefte = Math.round((parseInt(screen.width)*40)/100);    
    topecon=-(Math.round((parseInt(screen.height)*2)/100));
    leftecon=-(Math.round((parseInt(screen.width)*5)/100));
    }       
    document.getElementById('FeedbackContent').style.position='fixed';
    document.getElementById('FeedbackContent').style.top = String(tope) + "px";
    document.getElementById('FeedbackContent').style.left = String(lefte) + "px";    
    document.getElementById('popupImgContactClose').style.position='relative';
    document.getElementById('popupImgContactClose').style.top = String(tope+parseInt(topecon)) + "px";
    document.getElementById('popupImgContactClose').style.left = String(lefte+parseInt(leftecon)) + "px";
    loadPopup();
    Animate();
}

function Animate()
{
    var Element = document.getElementById("FeedbackContent");    
    if (Element.offsetWidth < 402)
    {
        Element.style.width = Element.offsetWidth + 10 + "px";
        setTimeout("Animate()", 0);
    }
    else if (Element.offsetHeight < 330)
    {
        Element.style.height = Element.offsetHeight + 10 + "px";
        setTimeout("Animate()", 0);
    }
    else
    {
        if (Element.offsetHeight > 330)
        {
            Element.style.height = "330px";
        }
        
        if (Element.offsetWidth > 402)
        {
            Element.style.width = "402px";
        }
        GetFeedbackPage();
    }
}

function GetFeedbackPage()
{
    var xmlHttp;
    xmlHttp=GetXmlHttpObject();    
    if (xmlHttp != null)
    {
        var url = document.URL;
//        if (url.indexOf("www") > -1)
//        {
//            url = "http://www.indiaeeducation.net/common/pop/FeedbackForm.html";
//        }
//        else
//        {
//            url = "http://indiaeducation.net/common/pop/FeedbackForm.html";
//        }
        xmlHttp.onreadystatechange=function()
        {
            if(xmlHttp.readyState==4)
            {
   		        //document.getElementById("FeedbackContent").innerHTML = xmlHttp.responseText;
   		        document.getElementById("FeedbackContent").innerHTML = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>Feedback</title><script type=\"text/javascript\">document.FeedForm.Captchalabel.innerHTML=\"dfdf\";</script></head><body onload=\"document.getElementById('FullName').focus();\"><form name=\"FeedForm\" method=\"post\" id=\"FeedForm\" style=\"margin: 0px;\" onsubmit=\"return validate()\"><div id=\"MainDiv\"><div><div style=\"width: 38%; float: left;\" ><div style=\"color: #666666; font-size: 12px; font-weight: bold; margin-right: 10px; text-align: left;\" >Give Your Feedback</div><div class=\"EmailBox\" ><div style=\"font-size: x-small; font-weight: bold; text-align: left;\" >Full Name:</div><input type=\"text\" id=\"FullName\" name=\"FullName\" maxlength=\"100\" style=\"width: 97%; border: 1px solid #CCCCCC;\" /><div style=\"font-size: x-small; font-weight: bold; text-align: left;\" >Email:</div><input type=\"text\" id=\"Email\" name=\"Email\" maxlength=\"100\" style=\"width: 97%; border: 1px solid #CCCCCC;\" /><div style=\"font-size: x-small; font-weight: bold; text-align: left;\" >City:</div><input type=\"text\" id=\"City\" name=\"City\" maxlength=\"100\" style=\"width: 97%; border: 1px solid #CCCCCC;\" /><div style=\"height: 5px;\" ></div><div><input type=\"checkbox\" id=\"Subscribe\" name=\"Subscribe\" style=\"float: left\" value=\"1\" /><div style=\"font-size: x-small; font-weight: bold; margin-top: 3px; float: left;\">Subscribe Newsletter</div><div style=\"clear: both\" ></div><input type=\"checkbox\" id=\"MailingList\" name=\"MailingList\" style=\"float: left\" value=\"1\" /><div style=\"font-size: x-small; font-weight: bold; margin-top: 3px; float: left;\" > Add To Mailing List</div></div></div></div><div style=\"width: 62%; float: left;\" ><div style=\"color: #666666; font-size: 12px; font-weight: bold; margin-right: 10px; text-align: left;\" > How do you feel about this page </div><div class=\"RateBar\" ><div class=\"Bar\" >Content?</div><div id=\"ContentChanda1\" class=\"Chanda\" onclick=\"OnClickChanda(this,1)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"ContentChandaImg1\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon1.gif\" alt=\"1\" /></div><div id=\"ContentChanda2\" class=\"Chanda\" onclick=\"OnClickChanda(this,1)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"ContentChandaImg2\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon2.gif\" alt=\"2\" /></div><div id=\"ContentChanda3\" class=\"Chanda\" onclick=\"OnClickChanda(this,1)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"ContentChandaImg3\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon3.gif\" alt=\"3\" /></div><div id=\"ContentChanda4\" class=\"Chanda\" onclick=\"OnClickChanda(this,1)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"ContentChandaImg4\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon4.gif\" alt=\"4\" /></div><div id=\"ContentChanda5\" class=\"Chanda\" onclick=\"OnClickChanda(this,1)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"ContentChandaImg5\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon5.gif\" alt=\"5\" /></div></div><div style=\"height: 7px;\" ></div><div class=\"RateBar\" ><div class=\"Bar\" >Design?</div><div id=\"DesignChanda1\" class=\"Chanda\" onclick=\"OnClickChanda(this,2)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"DesignChandaImg1\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon1.gif\" alt=\"1\" /></div><div id=\"DesignChanda2\" class=\"Chanda\" onclick=\"OnClickChanda(this,2)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"DesignChandaImg2\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon2.gif\" alt=\"2\" /></div><div id=\"DesignChanda3\" class=\"Chanda\" onclick=\"OnClickChanda(this,2)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"DesignChandaImg3\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon3.gif\" alt=\"3\" /></div><div id=\"DesignChanda4\" class=\"Chanda\" onclick=\"OnClickChanda(this,2)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"DesignChandaImg4\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon4.gif\" alt=\"4\" /></div><div id=\"DesignChanda5\" class=\"Chanda\" onclick=\"OnClickChanda(this,2)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"DesignChandaImg5\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon5.gif\" alt=\"5\" /></div></div><div style=\"height: 7px;\" ></div><div class=\"RateBar\" ><div class=\"Bar\" > Usefulness?</div><div id=\"UsefulChanda1\" class=\"Chanda\" onclick=\"OnClickChanda(this,3)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"UsefulChandaImg1\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon1.gif\" alt=\"1\" /></div><div id=\"UsefulChanda2\" class=\"Chanda\" onclick=\"OnClickChanda(this,3)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"UsefulChandaImg2\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon2.gif\" alt=\"2\" /></div><div id=\"UsefulChanda3\" class=\"Chanda\" onclick=\"OnClickChanda(this,3)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"UsefulChandaImg3\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon3.gif\" alt=\"3\" /></div><div id=\"UsefulChanda4\" class=\"Chanda\" onclick=\"OnClickChanda(this,3)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"UsefulChandaImg4\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon4.gif\" alt=\"4\" /></div><div id=\"UsefulChanda5\" class=\"Chanda\" onclick=\"OnClickChanda(this,3)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"UsefulChandaImg5\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon5.gif\" alt=\"5\" /></div></div><div style=\"height: 7px;\" ></div><div class=\"RateBar\" ><div class=\"Bar\" > Overall?</div><div id=\"OverallChanda1\" class=\"Chanda\" onclick=\"OnClickChanda(this,4)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"OverallChandaImg1\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon1.gif\" alt=\"1\" /></div><div id=\"OverallChanda2\" class=\"Chanda\" onclick=\"OnClickChanda(this,4)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"OverallChandaImg2\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon2.gif\" alt=\"2\" /></div><div id=\"OverallChanda3\" class=\"Chanda\" onclick=\"OnClickChanda(this,4)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"OverallChandaImg3\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon3.gif\" alt=\"3\" /></div><div id=\"OverallChanda4\" class=\"Chanda\" onclick=\"OnClickChanda(this,4)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"OverallChandaImg4\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon4.gif\" alt=\"4\" /></div><div id=\"OverallChanda5\" class=\"Chanda\" onclick=\"OnClickChanda(this,4)\" onmouseover=\"OnChanda(this)\" onmouseout=\"OffChanda(this)\" ><img style=\"margin: 0px;\" id=\"OverallChandaImg5\" src=\"http://www.indiaeducation.net/Template/common_images/Emoticon5.gif\" alt=\"5\" /></div></div></div></div><div style=\"clear: both\" ></div><div style=\"height: 12px;\" ><!-- Blank Div --></div><div class=\"FeedBox\" ><div id=\"FeedTopic\" style=\"color: #666666; font-size: 12px; font-weight: bold; margin-right: 10px; text-align: left;\" > Select your feedback topic below </div><div style=\"width: auto; margin-top: 10px;\" ><div class=\"BoxButton\" id=\"Tab1\" onclick=\"ChangeTab(this)\" ><div style=\"float: left; margin-top: 4px;\" ><img src=\"http://www.indiaeducation.net/Template/common_images/feed_bug.gif\" alt=\"Error\" /></div><div style=\"float: left; color: #666666; font-size: 12px; font-weight: bold; margin-top: 5px;  margin-left: 3px;\" > Error</div></div><div class=\"ActiveBox\" id=\"ActiveTab1\" style=\"display: none;\" ><div style=\"float: left; margin-top: 4px;\" ><img src=\"http://www.indiaeducation.net/Template/common_images/feed_bug.gif\" alt=\"Error\" /></div><div style=\"float: left; color: #666666; font-size: 12px; font-weight: bold; margin-top: 5px; margin-left: 3px;\" > Error</div></div><div style=\"float: left; width: 10px;\" > &nbsp;</div><div class=\"BoxButton\" id=\"Tab2\" onclick=\"ChangeTab(this)\" ><div style=\"float: left; margin-top: 4px;\"><img src=\"http://www.indiaeducation.net/Template/common_images/feed_content.gif\" alt=\"Comments\" /></div><div style=\"float: left; color: #666666; font-size: 12px; font-weight: bold; margin-top: 5px; margin-left: 3px;\">Comments</div></div><div class=\"ActiveBox\" id=\"ActiveTab2\" style=\"display: none;\" ><div style=\"float: left; margin-top: 4px;\" ><img src=\"http://www.indiaeducation.net/Template/common_images/feed_content.gif\" alt=\"Comments\" /></div><div style=\"float: left; color: #666666; font-size: 12px; font-weight: bold; margin-top: 5px; margin-left: 3px;\" > Comments</div></div><div style=\"float: left; width: 10px;\" > &nbsp;</div><div class=\"BoxButton\" id=\"Tab3\" onclick=\"ChangeTab(this)\" ><div style=\"float: left; margin-top: 4px;\" ><img src=\"http://www.indiaeducation.net/Template/common_images/feed_suggestion.gif\" alt=\"Suggestion\" /></div><div style=\"float: left; color: #666666; font-size: 12px; font-weight: bold; margin-top: 5px; margin-left: 3px;\" > Suggestion</div></div><div class=\"ActiveBox\" id=\"ActiveTab3\" style=\"display: none;\" ><div style=\"float: left; margin-top: 4px;\" ><img src=\"http://www.indiaeducation.net/Template/common_images/feed_suggestion.gif\" alt=\"Suggestion\" /></div><div style=\"float: left; color: #666666; font-size: 12px; font-weight: bold; margin-top: 5px; margin-left: 3px;\" > Suggestion</div></div></div><div class=\"BoxFeed\" id=\"FeedBox\" style=\"display: none;\" ><div style=\"width: auto;\" ><div id=\"BoxTab1\" style=\"width: 106px; float: left; border-top: 1px solid #CCC; height: 1px;\" ></div><div style=\"float: left; border-top: 1px solid #CCC; width: 11px; height: 1px;\" ></div><div id=\"BoxTab2\" style=\"width: 107px; float: left; border-top: 1px solid #CCC; height: 1px;\" ></div><div style=\"float: left; border-top: 1px solid #CCC; width: 12px; height: 1px;\" ></div><div id=\"BoxTab3\" style=\"width: 106px; float: left; border-top: 1px solid #CCC; height: 1px;\" ></div><div style=\"float: left; border-top: 1px solid #CCC; width: 12px; height: 1px;\" ></div></div><div style=\"width: auto; padding-left: 8px; padding-right: 10px; padding-top: 10px; padding-bottom: 10px;\" ><textarea name=\"Feedback\" id=\"Feedback\" cols=\" \" rows=\"5\" style=\"width: 99%; border: 1px solid #CCCCCC;\" ></textarea></div><div style=\"clear: both\" ></div></div><div style=\"clear: both;\" ></div></div><div style=\"width: 100%; height: 10px;\" ></div><div style=\"width: 100%\" ><div style=\"float: left; width: 205px;\" ><div style=\"float: left; width: 100%;\" ><span id=\"Captchalabel\" style=\"cursor: pointer; float: left;\" title=\"Click to change image.\" title=\"Captcha Image\"></span><script type=\"text/javascript\">document.write(\"ddddddddddd\");</script><img src=\"http://www.indiaeducation.net/Template/common_images/refresh.gif\" onclick=\"Changelabel()\" style=\"cursor: pointer; float: left; margin-top: 5px; margin-right: 5px;\" title=\"Click to change image.\" alt=\"Refresh Image\" /><input type=\"text\" id=\"CodeNumberTextBox\" name=\"CodeNumberTextBox\" style=\"font-size: smaller; border: 1px solid #CCCCCC; float: left; margin-top: 3px; color: #C0C0C0; width: 95px;\" value=\"Enter Code\" onfocus=\"this.value='';this.style.color='black';\" maxlength=\"6\" /></div><div style=\"font-size: x-small; text-align: left;\" >Enter text shown above in the text box.</div></div><div style=\"float: left; width: 173px;\" ><div style=\"height: 40px; float: right;\" ><img id=\"FeedProgressImg\" src=\"http://www.indiaeducation.net/Template/common_images/preloader_mast.gif\" alt=\"Please Wait..\" style=\"margin-right: 5px; margin-bottom: 10px; float: left; display: none;\" height=\"30\" /><input type=\"image\" src=\"http://www.indiaeducation.net/Template/common_images/feed_send.gif\" alt=\"Send\" /><img src=\"http://www.indiaeducation.net/Template/common_images/feed_cancel.gif\" alt=\"Cancel\" style=\"cursor: pointer;\" onclick=\"RestoreFeedback()\" /></div></div></div><div style=\"clear: both;\" ></div></div><input type=\"hidden\" id=\"Rating1\" /><input type=\"hidden\" id=\"Rating2\" /><input type=\"hidden\" id=\"Rating3\" /><input type=\"hidden\" id=\"Rating4\" /><input type=\"hidden\" id=\"Tab\" /></form><div id=\"MsgDiv\" style=\"display: none;\" ><div><div style=\"height: 24px; float: left; padding-top: 3px; padding-right: 3px; width: 265px; text-align: right;\" >Feedback Recieved. Thank You!</div><img style=\"float: left; cursor: pointer;\" onclick=\"RestoreFeedback()\" src=\"http://www.indiaeducation.net/Template/common_images/close.jpg\" alt=\" :)\" /></div></div></body></html>";
            }
        }
        xmlHttp.open("GET",url,true);
        xmlHttp.send(null);
    }
}

function OnChanda(Mama)
{
    Mama.style.borderColor = "#CCCCCC";
}

function OffChanda(Mama)
{
    if (Mama.style.borderStyle != "solid")
    {
        Mama.style.borderColor = "#FFFFFF";
    }
}

function OnClickChanda(Mama,DoorKe)
{
    var RateSection = Mama.id;
    RateSection = RateSection.replace("Chanda", "");    
    for (i = 0; i <=5; i++)
    {
        RateSection = RateSection.replace(i, "");
    }
    for (i = 1; i <= 5; i++)
    {
        document.getElementById(RateSection + "ChandaImg" + i).style.border = "0px";
    }
    
    var ImgElement = document.getElementById(document.getElementById(Mama.id).getElementsByTagName("img").item(0).id);
    ImgElement.style.border = "1px solid #8FA041";
    
    var Rating = Mama.id;
    Rating = Rating.replace(RateSection + "Chanda", "");    
    document.getElementById("Rating" + DoorKe).value = Rating;
}

function ChangeTab(Element)
{
    var TabNum =  Element.id;
    TabNum = TabNum.replace("Tab","");
    
    Element.style.display = "none";

    for (i = 1; i <=3; i++)
    {
        if (i != TabNum)
        {
            document.getElementById("Tab" + i).style.display = "";
            document.getElementById("ActiveTab" + i).style.display = "none";
            document.getElementById("BoxTab" + i).style.borderColor = "#CCC";
        }
        else
        {
            document.getElementById("ActiveTab" + i).style.display = "";
            document.getElementById("BoxTab" + i).style.borderColor = "#FFF";
        }
    }
    
    document.getElementById("FeedBox").style.display = "";
    document.getElementById("Feedback").focus();
    document.getElementById("Tab").value = TabNum;
    
    document.getElementById("FeedbackContent").style.height = document.getElementById("MainDiv").offsetHeight;
}

function validate()
{
    var TheForm = document.getElementById("FeedForm");
    if (((TheForm.Subscribe.checked == true) || (TheForm.MailingList.checked == true)) && (TheForm.Email.value.length == 0))
    {
        alert("Please Enter Your Email!");
        return (false);
    }    
    if (TheForm.Email.value == "")
    {
        alert("Please Enter Your Email Address!");
        return (false);
    }    
    if (!TheForm.Email.value==""){var x = TheForm.Email.value;var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;if (!filter.test(x)){alert("Enter a valid e-mail id");TheForm.Email.focus();TheForm.Email.select();return false;}}
    
    if (CheckData(TheForm) == false)
    {
        alert("Feedback is required! You must either give rating or enter some details!");
        return (false);
    }    
    if ((TheForm.CodeNumberTextBox.value == "Enter Code") || (TheForm.CodeNumberTextBox.value == ""))
    {
        alert("Please enter the text code shown on the left bottom, in the text box just to it's right!");
        TheForm.CodeNumberTextBox.focus();
        return (false);
    }
    if ((TheForm.CodeNumberTextBox.value != document.getElementById("Captchalabel").innerHTML))
	{
		alert("Text entered in the text box to match to it's right!");
		TheForm.CodeNumberTextBox.focus();return (false);
	}
	if ((TheForm.CodeNumberTextBox.value == document.getElementById("Captchalabel").innerHTML))
	{
		document.getElementById("FeedProgressImg").style.display = "";
        PostFeedback();
        return (false);
	}    
}

function CheckData(TheForm)
{
    var TheName;    
    if ((TheForm.Rating1.value.length == 0) && (TheForm.Rating2.value.length == 0) && (TheForm.Rating3.value.length == 0) && (TheForm.Rating4.value.length == 0) && (TheForm.Feedback.value.length == 0))
    {
        return (false);
    }    
    return (true);
}

function PostFeedback()
{
    var Form = document.getElementById("FeedForm")
    var xmlHttp;
    xmlHttp = GetXmlHttpObject();
    
    if (xmlHttp != null)
    {
        var url = document.URL;
        var feedurl;
        var str =document.URL;
        var url_check = str.search(".aspx");
        var www_check = str.search("www.");    
        if (url_check != -1)
        {
        str.replace("www.", "");
        feedurl = str;
        }
        else
        {
        str.replace("www.", "");
        feedurl = str+"index.aspx";
        }
        
        if (url.indexOf("www") > -1)
        {
            //url = "http://www.indiaeducation.net/common/pop/feedback.aspx";
            url = "http://www.indiaeducation.net/common/pop/feedback.aspx";
        }
        else
        {
            //url = "http://indiaeducation.net/common/pop/feedback.aspx";
            url = "http://www.indiaeducation.net/common/pop/feedback.aspx";
        }
        url = url + "?url=" + feedurl;
        url = url + "&FullName=" + Form.FullName.value;
        url = url + "&Email=" + Form.Email.value;
        url = url + "&City=" + Form.FullName.value;
        url = url + "&Subscribe=" + Form.Subscribe.value;
        url = url + "&MailingList=" + Form.MailingList.value;
        url = url + "&Feedback=" + Form.Feedback.value;
        url = url + "&Rating1=" + Form.Rating1.value;
        url = url + "&Rating2=" + Form.Rating2.value;
        url = url + "&Rating3=" + Form.Rating3.value;
        url = url + "&Rating4=" + Form.Rating4.value;
        url = url + "&Tab=" + Form.Tab.value;
        url = url + "&CodeNumberTextBox=" + Form.CodeNumberTextBox.value;
        url = url + "&Perform=PostFeed";
        
        xmlHttp.onreadystatechange=function()
        {
            if(xmlHttp.readyState==4)
            {
                if (xmlHttp.responseText == "Please Enter The Correct Captcha Code!")
                {
                    document.getElementById("FeedProgressImg").style.display="none";
                    alert(xmlHttp.responseText);
                }
                else
                {
                    document.getElementById("FeedbackContent").innerHTML = xmlHttp.responseText;
                }
            }
        }
        xmlHttp.open("GET",url,true);
        xmlHttp.send(null);
    }
}

function RestoreFeedback()
{
    window.close();
    //disablePopup();
    //document.getElementById("FeedbackContent").innerHTML = "";
    //document.getElementById("FeedbackContent").style.height = "330px";
    //document.getElementById("FeedbackContent").style.width = "402px";
}

//AJAX Function for finding client XML HTTP Object
//------------------------------------------------
function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
  
if (xmlHttp==null)
    {
        alert ("Your browser does not support AJAX!");
        return;
    }
    
return xmlHttp;
}
//----------------------------------------------------------------------------//
//--------------------------------------------------------//
function ChangeImage()
{
    var TheImage = document.getElementById("CaptchaImage");
    var random=Math.random()*5;
    var imgsrc=TheImage.src;
   
     if (imgsrc.indexOf("www") > -1)//if (TheImage.src == "http://www.indiaeducation.net/captcha/captcha.aspx")
    {
        TheImage.src = "http://www.indiaeducation.net/captcha/changecaptcha.aspx?random="+random;
    }
    else
    {
        TheImage.src = "http://indiaeducation.net/captcha/captcha.aspx?random="+random;
    }
}
//-------------------------------------------------------//
// Feedback Form Script Ends ---------------------------//

// Group Logo Script ----------------------------------//
function popup1(programName, width, height)
    {
        var temp = "menubar=yes,toolbar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height;
        displayWindow = window.open(programName, "displayWindow", temp);
    }
    
    function Bookmark()
    {
        var url = document.URL;
        var title = document.title;
    
        if (window.sidebar) // Mozilla Firefox Bookmark 
        { 
            window.sidebar.addPanel(title, url,"");
        } 
        else if( window.external ) // IE Favorite
        { 
            window.external.AddFavorite( url, title); 
        }
        else
        {
            alert("This browser is not supported! Please press Ctrl+D to bookmark this page.");
        }
    }
    
function validform(theForm)
{
    if (theForm.user.value == "")
    {
        alert("Please Enter Username!");
        theForm.user.focus();
        return (false);
    }
    
    if (theForm.pwd.value == "")
    {
        alert("Please Enter Password!");
        theForm.pwd.focus();
        return (false);
    }
    return (true);
}

function st2bottom(tbottom) {

    for (bottomi = 1; bottomi<=8; bottomi++) {
        tsbottom = document.getElementById('ttbottom' + bottomi);
        trbottom = document.getElementById('ddbottom' + bottomi);
        tabottom = document.getElementById('aabottom' + bottomi);
        if (tbottom == bottomi) {
            tsbottom.className = "tbmain2bottom1";
            tabottom.className = "srchlinksel2bottomb";
            tsbottom.style.borderBottom = "1px solid #A0C9E7";
            trbottom.style["display"] = "block";
            trbottom.style["visibility"] = "visible";
            
        }
        else {
            tsbottom.className = "tb2bottom1";
            tabottom.className = "srchlink2bottomb";
            tsbottom.style.borderBottom = "1px solid #73AEDB";
            trbottom.style["display"] = "none";
            trbottom.style["visibility"] = "hidden";
        }

    }
}
//---Google adds-----------------------------------------------------------------------------//
function positioneredu()
{
    document.getElementById('elemente2').style.left = document.getElementById('elemente1').offsetLeft -137 + "px";
    document.getElementById('elemente2').style.top = document.getElementById('elemente1').offsetTop + "px";
    document.getElementById('elemente2').style.display = '';
}

function positioner()
{
    document.getElementById('element2').style.left = document.getElementById('element1').offsetLeft -137 + "px";
    document.getElementById('element2').style.top = document.getElementById('element1').offsetTop + "px";
    document.getElementById('element2').style.display = '';
}

function positionerspeech()
{
    document.getElementById('elements2').style.left = document.getElementById('elements1').offsetLeft -137 + "px";
    document.getElementById('elements2').style.top = document.getElementById('elements1').offsetTop + "px";
    document.getElementById('elements2').style.display = '';
}

function positioner4()
{
    document.getElementById('element12').style.left = document.getElementById('element11').offsetLeft -137 + "px";
    document.getElementById('element12').style.top = document.getElementById('element11').offsetTop + "px";
    document.getElementById('element12').style.display = '';
}

function positioner2()
{
    document.getElementById('element20').style.left = document.getElementById('element10').offsetLeft -137 + "px";
    document.getElementById('element20').style.top = document.getElementById('element10').offsetTop + "px";
    document.getElementById('element20').style.display = '';
}

function positioner3()
{
    document.getElementById('element200').style.left = document.getElementById('element100').offsetLeft -137 + "px";
    document.getElementById('element200').style.top = document.getElementById('element100').offsetTop + "px";
    document.getElementById('element200').style.display = '';
}
//---Google adds ends-------------------------------------------------------//


function disableContent()
{
    document.getElementById("FeedbackContent").innerHTML = "";
    document.getElementById("FeedbackContent").style.height = "25px";
    document.getElementById("FeedbackContent").style.width = "25px";
}
//-------------jquery popup End--------------

