var gappName = 'hindi';
var wbdUrlList = {'www.webdunia.com':'http://hindi.webdunia.com','msn.webdunia.com':'http://hindi.webdunia.com','webdunia.com':'http://hindi.webdunia.com','discussion.webdunia.com':'http://hindi.webdunia.com','astrology.webdunia.com':'http://hindi.webdunia.com','in.webdunia.com':'http://hindi.webdunia.com'};
var urlPrefix = wbdUrlList[window.location.hostname] || ""

document.write('<script type="text/javascript" src="http://partner.googleadservices.com/gampad/google_service.js"></script>');

var wbdUtils = {};
wbdUtils.DOM = {};
wbdUtils.DOM.getParentByName = function(obj,name, tagName){
    if(!tagName) tagName= '*';
    if(typeof(obj)=='string') obj = document.getElementById(obj);
    var prnt = obj.parentNode, found=false;
    while(prnt.tagName.toLowerCase() != 'body'){
        var objName = prnt.attributes?prnt.attributes.getNamedItem("name")?prnt.attributes.getNamedItem("name").value:'':'';
        if(found = ((tagName=='*' || prnt.tagName.toLowerCase()==tagName.toLowerCase()) && (name=="" || objName==name))) break;
        prnt = prnt.parentNode;
    }
    return (found?prnt:null);
};

function showVideo4(obj, url)
{
      var objCont = wbdUtils.DOM.getParentByName(obj,'div_rgVideo','div'); 
      var objDv;
      if(objCont.childNodes.length>1) objDv= objCont.childNodes[0];
        var qry = url;
        var objectTag='<object width="100%" height="100%" align="middle" id="fp" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><param value="always" name="allowScriptAccess" /><param name="movie" value="/img/cm/video/RightVideo.swf?filepath='+qry+'"/> <param><param value="high" name="quality" /><param value="#ffffff" name="bgcolor" /><embed width="100%" height="100%" align="middle" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowscriptaccess="always" name="DemoVideo"  bgcolor="#ffffff" quality="high" src="/img/cm/video/RightVideo.swf?filepath='+qry+'" /></object>'
        objDv.innerHTML = objectTag;
        
    objprnt = obj.parentNode;
    if(objprnt!=null)
    { 
        var objTag = objprnt.getElementsByTagName("a");
        if(objTag.length>0)
        {
            var objDivTag = objCont.childNodes[1];
            objDivTag = objDivTag.getElementsByTagName("div");
            for(var i=0; i<objDivTag.length; i++)
            {
                var dv = objDivTag[i];
                dv.className = "";
            }
            objprnt.className = "wdc_selectedVdo";    
        }
    }
}

function OpenRightVideo(obj,vpath)
{
    obj.parentNode.innerHTML="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'  width='300px' height='200px' type='application/x-shockwave-flash' id='RightVideoPlayer'><param name='movie' value='/img/cm/video/Right_Video_Player.swf?filepath=" + vpath + "&expand=0' /><param name='FlashVars' value='allowResize=true' /><embed src='/img/cm/video/Right_Video_Player.swf?filepath=" + vpath + "&expand=0' quality='high' wmode='transparent' devicefont='true' bgcolor='#000000' width='100%' height='100%' name='mediaplayer' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' allowfullscreen='true' /></object>";
}

function OpenArticleVideo(obj,vpath)
{
    var strcontent="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='100%' height='100%' id='WDPlayer150x150' align='middle'><param name='allowScriptAccess' value='always' /><param name='movie' value='/img/cm/video/Article_Video_Player.swf?filepath=" + vpath + "&expand=1' /><param name='quality' value='high' /><param name='devicefont' value='true' /><param name='bgcolor' value='#000000' /><param name='FlashVars' value='allowResize=true' /><embed src='/img/cm/video/Article_Video_Player.swf?filepath=" + vpath + "&expand=1' quality='high' wmode='transparent' devicefont='true' bgcolor='#000000' width='100%' height='100%' name='mediaplayer' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' allowfullscreen='true' /></object>";
    obj.parentNode.innerHTML=strcontent;
}


function OpenGallery(ImageId, GalleryId, Index, Link)
{
//    if(window.location.hostname=='www.webdunia.com')
//        openWindowCenterScreen("http://hindi.webdunia.com/PhotoGallery/PhotoGalleryImageWindow.aspx?IId=" + ImageId  + "&GId=" + GalleryId + "&Idx=" + Index + "&Link=" + Link,"gallery",700,580)
//   else     
        //openWindowCenterScreen(urlPrefix + "/PhotoGallery/PhotoGalleryImageWindow.aspx?IId=" + ImageId  + "&GId=" + GalleryId + "&Idx=" + Index + "&Link=" + Link,"gallery",700,580)
        window.open("http://PhotoGallery.webdunia.com/"+gappName+"/inner.aspx?GalleryId=" + GalleryId + "&ShowImageId=" +  ImageId);  
}
function setFlashMaxB(){
	//alert("setFlashMax");
	document.getElementById('flashVideodiv').style.width = '440px';
	document.getElementById('flashVideodiv').style.height = '350px';
}

function setFlashRestoreB(){
	//alert("setFlashMa");
	document.getElementById('flashVideodiv').style.width = '150px';
	document.getElementById('flashVideodiv').style.height = '150px';
}
function fnopen(url,frmName,prm)
{
 window.open(url,frmName,prm);
}
function popAsthaArchive(path){
testwindow= window.open (path, "mypollwindow","location=no,status=no,scrollbars=no, width=320,height=340");
}

function deleteDiv(){
document.getElementById('shoshAd').style.display = "none";
}

function mtest(){
	var url = window.location.href;
	alert(url);
}
// This function is written for the text overflow issue in Mozilla.
if((document.all)&&(navigator.appVersion.indexOf('MSIE 7.')!=-1))
{
	//alert ("Running IE7");
	document.write(" <STYLE type='text/css'>.divCreate{width:460px;}\n.searchIcon{padding-left:5px;}\n.kreativeArticle{width:100%;}</STYLE>");
}
if (document.layers) {
	//alert ("Running Netscape 4");
	document.write(" <STYLE type='text/css'>.kreative{width:100%;}\n.kreativeArticle{width:100%;}\n.searchIcon{padding-left:5px;} </STYLE>");
}else if(document.all){
	//alert ("Running IE");
	document.write(" <STYLE type='text/css'>.kreative{}\n.kreativeArticle{width:100%;}\n.searchIcon{padding-left:5px;}</STYLE>");
}else if(document.getElementById){
	//alert ("Running Netscape 6");
	document.write(" <STYLE type='text/css'>.kreative{width:87%;}\n.kreativeArticle{width:90%;}\n.selectedTab{padding-right:30px;}\n.minutDropdown{width:83px;}\n.divCreate{width:460px;}\n.searchIcon{padding-left:30px;}</STYLE>");
}else{
	//alert("Older than 4.0 browser.");
	document.write(" <STYLE type='text/css'>.kreative{width:100%;}\n.kreativeArticle{width:100%;}\n.searchIcon{padding-left:5px;} </STYLE>");
}
function openPoll()
{
    for(var i=0;i<document.frmpoll.Opinion.length;i++)
    {
        if(document.frmpoll.Opinion[i].checked)
        {
       var answer=document.frmpoll.Opinion[i].value;
                              
       }
    }                    
    var catid = document.frmpoll.CatId.value;
    var pollid = document.frmpoll.PollId.value;
    var page = 0;
    //if(window.location.hostname=='www.webdunia.com')
        //openWindowCenterScreen("http://hindi.webdunia.com/Poll/PollResult.aspx?result=" +answer + "&pollid=" +pollid + "&page=" +page , 'PollResult',480,500);
    //else
        openWindowCenterScreen(urlPrefix + "/Poll/PollResult.aspx?result=" +answer + "&pollid=" +pollid + "&page=" +page , 'PollResult',480,500);
}
function popRashi()
{
    var rashiId = document.getElementById("selrashi").value;
    var rashiMode = document.getElementById("selrashimode").value;
    //if(window.location.hostname=='www.webdunia.com')
        //window.location.href="http://hindi.webdunia.com/astrology/predictions/predictions.aspx?rashiId=" +rashiId + "&rashiMode=" +rashiMode + "#" + rashiId;
    //else  
        window.location.href=urlPrefix + "astrology/predictions/predictions.aspx?rashiId=" +rashiId + "&rashiMode=" +rashiMode + "#" + rashiId;
}
function ShowPrinterFriendlyVersion()
{	
	openWindowCenterScreen(urlPrefix + "/common/Print.htm","PrintArticle",600,650,'yes')
}
function  ShowFeedBack()
{
	var object = document.getElementById("tAH");    
    var articleTitle;
    if(object!=null)    
    {
        //articleTitle = document.getElementById("tAH").innerText;
        //articleTitle = object.innerHTML;
        articleTitle = "";
        var obj = object.getElementsByTagName("span");
        if(obj && obj.length>0)
            articleTitle = obj[0].innerHTML;
    } else {
        object = document.getElementById("printdiv");
        if(object!=null)
        {
          var tmp = object.getElementsByTagName("td");
         
            for(var i=0;i<tmp.length;i++)
            {
                if(tmp[i].className == "articleHeading")
                {
                    articleTitle = tmp[i].innerHTML;
                
                    break;
                 }
             }
        }
        else
        {
         articleTitle = "";
        }
     }
	
  //  if(window.location.hostname=='www.webdunia.com')
	   // openWindowCenterScreen("http://hindi.webdunia.com/portalcms/feedback/feedback.aspx?url=" + escape(window.location.href) + "&articletitle=" +escape(articleTitle),'FeedBack',460,480);
	//else
//	    openWindowCenterScreen(urlPrefix + "/portalcms/feedback/feedback.aspx?url=" + escape(window.location.href) + "&articletitle=" +escape(articleTitle),'FeedBack',410,480);	
        openWindowCenterScreen("http://feedback.webdunia.com/"+gappName+"/default.aspx?url=" + escape(window.location.href) + "&articletitle=" +escape(articleTitle),'FeedBack',410,480);	
}
function EmailValidation(source,args)
 {  
           
     var mails =new Array();
     var txt =document.getElementById('txtFriendEmail').value;
     mails=txt.split(",");
    
     for(i=0;i<mails.length ;i++)
     {
     	     
        chktxt = mails[i].split("@");    
        
        if (chktxt.length<2)
            {
	          args.IsValid=false;
	          break;
            }
        else
            {	        
              if(chktxt[1].length>0)
              {
	            var chktxt1 = chktxt[1].split(".");	
	                  
	            if (chktxt1.length<2)
	            {
	            
		            args.IsValid=false;
		               break;
	            }
	            else 
	            {
	               
	                if(isNaN(chktxt1[1]))
	                {
	                   
	                    args.IsValid=true;   
	                }
	                else
	                    args.IsValid=false;
	            }
	           }
	           else args.IsValid=false;
            }	                  
         }
 }
 
 function EmailValidation1(source,args)
 {  
           
     var mails =new Array();
     var txt =document.getElementById('txtEmail').value;
     mails=txt.split(",");
    
     for(i=0;i<mails.length ;i++)
     {
     	     
        chktxt = mails[i].split("@");    
        
        if (chktxt.length<2)
            {
	          args.IsValid=false;
	          break;
            }
        else
            {	        
              if(chktxt[1].length>0)
              {
	            var chktxt1 = chktxt[1].split(".");	
	                  
	            if (chktxt1.length<2)
	            {
	            
		            args.IsValid=false;
		               break;
	            }
	            else 
	            {
	               
	                if(isNaN(chktxt1[1]))
	                {
	                   
	                    args.IsValid=true;   
	                }
	                else
	                    args.IsValid=false;
	            }
	           }
	           else args.IsValid=false;
            }	                  
         }
 }
 
  function feedopen()
{
  
	if (document.frmfeedback.viewer_name.value.replace(/ /g,'').length==0)
	{
		alert('Enter your name');
		document.frmfeedback.viewer_name.focus();
		return false;
	}
	if (document.frmfeedback.viewer_email.value.replace(/ /g,'').length==0)
	{
		alert('Enter your email address');
		return false;		
	}
	else
	{
	    var strEmailRegExp=/\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
		var strEmail=document.frmfeedback.viewer_email.value;
		if(!strEmail.match(strEmailRegExp))
		{
		    alert('Enter a valid email address');
		    document.frmfeedback.viewer_email.focus();
		    return false;
		}
	}
	if (document.frmfeedback.viewer_suggestion.value.replace(/ /g,'').length==0)
	{
		alert('Enter feedback about this article');
		document.frmfeedback.viewer_suggestion.focus();
		return false;
	}
	//document.frmfeedback.target = "new window";
	document.frmfeedback.submit();
}
function openWindowCenterScreen(url,name,height,width,hasScroll,hasResize)
{
  var sBars='no';
  var sResise='no';
  if(hasScroll!=null)
    sBars=hasScroll
  if(hasResize!=null)
    sResise=hasResize  
  var w =width; //32;
  var h =height; //96;
  var wleft = (screen.width - w) / 2;
  var wLinks = (screen.height - h) / 2;
  var win = window.open(url,name,
                            'width=' + w + ', height=' + h + ', ' +
                            'left=' + wleft + ', Links=' + wLinks + ', ' +
                            'location=no, menubar=no, ' +
                            'status=no, toolbar=no, scrollbars=' + sBars + ', resizable=' + sResise );
  // Just in case width and height are ignored
  //win.resizeTo(w, h);
  // Just in case left and Links are ignored
  //win.moveTo(wleft, wLinks);
  win.focus();    
}
function keyboardHelp(){
    //if(window.location.hostname=='www.webdunia.com')
        //openWindowCenterScreen("http://hindi.webdunia.com/help/keyboard_help.htm","KeyBoardHelp",470,600,'yes')
    //else
        openWindowCenterScreen(urlPrefix + "/help/keyboard_help.htm","KeyBoardHelp",470,600,'yes')
}
function hideDiv(divName){document.getElementById(divName).style.display = "none";}
// HINDI This function is written for Search Tab  --------Start-------
function SetTab(objID)
{
    document.getElementById("tdTab1").className="TabGrayTD";
    document.getElementById("tdTab2").className="TabGrayTD";
    document.getElementById("tdTab3").className="TabGrayTD";
    document.getElementById("tdTab4").className="TabGrayTD";
    document.getElementById("tdTab5").className="TabGrayTD";
    document.getElementById("tdTab6").className="TabGrayTD";
    document.getElementById("tdTab7").className="TabGrayTD";
    document.getElementById("tdTab8").className="TabGrayTD";
    document.getElementById("tdTab9").className="TabGrayTD";
    document.getElementById(objID.replace('div','td')).className="TabRedTD";
}
function SetTabInitial()
{
    document.getElementById("tdTab1").className="TabRedTD";
}
// HINDI This function is written for Search Tab --------End-------


//send to Friend Funtion
function  ShowSendToFriend()
{  
    var object = document.getElementById("tAH");    
    var articleTitle;
    if(object!=null)    
    {
        //articleTitle = object.innerHTML;
               articleTitle = "";
        var obj = object.getElementsByTagName("span");
        if(obj && obj.length>0)
            articleTitle = obj[0].innerHTML;
    } else {
        object = document.getElementById("printdiv");
        if(object!=null)
        {
          var tmp = object.getElementsByTagName("td");
         
            for(var i=0;i<tmp.length;i++)
            {
                if(tmp[i].className == "articleHeading")
                {
                    articleTitle = tmp[i].innerHTML;
                
                    break;
                 }
             }
        }
        else
        {
         articleTitle = "";
        }
     }
        
      //  if(window.location.hostname=='www.webdunia.com')
            //openWindowCenterScreen("http://hindi.webdunia.com/PortalCMS/sendtofriend/sendtofriendmail.aspx?url=" + escape(window.location.href) + "&title=" +escape(articleTitle),"SendToFriend",560,480)
     //   else
//            openWindowCenterScreen(urlPrefix + "/PortalCMS/sendtofriend/sendtofriendmail.aspx?url=" + escape(window.location.href) + "&title=" +escape(articleTitle),"SendToFriend",560,480)
             openWindowCenterScreen("http://in.webdunia.com/" + gappName + "/portalcms/SendToFriend/SendToFriendmail.aspx?url=" + escape(window.location.href) + "&title=" +escape(articleTitle),"SendToFriend",560,480)
}

function  ShowVideos(query,wHeight, wWidth)
{
    //var url = "/Videos/ShowVideo.aspx?"+query;
    var url = "";
    //if(window.location.hostname=='www.webdunia.com')
      //  url = "http://hindi.webdunia.com/videos/webduniaPlayer.html?"+query;
    //else
        url = urlPrefix + "/videos/webduniaPlayer.html?"+query;
    var wName = "ShowVideo"
	openWindowCenterScreen(url,wName,350,750);
//	postWindowsData(url,wName,query)
}

function postWindowsData(url,name,param){
    var params = param.split(/&/);
    var hdn, data, frm = document.createElement("form");
    frm.method="post";
    frm.target=name;
    frm.action=url;
    window.document.body.appendChild(frm);
    for(var idx=0; idx<params.length; idx++){
        data = params[idx].split(/=/);
        hdn = document.createElement("input");
        hdn.type="hidden";
        hdn.name=data[0];
        hdn.value = (data[1]?data[1]:data[0]);
        frm.appendChild(hdn);
    }
    frm.submit();
    window.document.body.removeChild(frm);
}
/* functions for Date Validation By: Vikas Sharma Starts Here*/

var dtCh= "/";
var minYear=1900;
var maxYear=2100;

function isInteger(s)
{
	var i;
    for (i = 0; i < s.length; i++){   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag)
{
	var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++){   
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function daysInFebruary (year)
{
	// February has 29 days in any year evenly divisible by four,
    // EXCEPT for centurial years which are not also divisible by 400.
    return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );
}
function DaysArray(n) 
{
	for (var i = 1; i <= n; i++) {
		this[i] = 31
		if (i==4 || i==6 || i==9 || i==11) {this[i] = 30}
		if (i==2) {this[i] = 29}
   } 
   return this
}

function isDate(dtStr,sexflag)

{


	var daysInMonth = DaysArray(12)
	var pos1=dtStr.indexOf(dtCh)
	var pos2=dtStr.indexOf(dtCh,pos1+1)
	var strDay=dtStr.substring(0,pos1)
	var strMonth=dtStr.substring(pos1+1,pos2)
	var strYear=dtStr.substring(pos2+1)
	strYr=strYear
	if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1)
	if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1)
	for (var i = 1; i <= 3; i++) {
		if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1)
	}
	month=parseInt(strMonth)
	day=parseInt(strDay)
	year=parseInt(strYr)
	if (pos1==-1 || pos2==-1)
	{
		alert("The date format should be : dd/mm/yyyy")
		if(sexflag == 'M')
		document.getElementById('dateControl_DDLDate').focus();
		if(sexflag == 'F')
		document.getElementById('date1_DDLDate').focus();
		if(sexflag == 'A')
		document.getElementById('date1_DDLDate').focus();
		return false
	}
	if (strMonth.length<1 || month<1 || month>12){
		alert("Please enter a valid month")
		if(sexflag == 'M')
		document.getElementById('dateControl_DDLDate').focus();
		if(sexflag == 'F')
		document.getElementById('date1_DDLDate').focus();
		if(sexflag == 'A')
		document.getElementById('date1_DDLDate').focus();
		return false
	}
	if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month])
	{
		alert("Please enter a valid day")
		if(sexflag == 'M')
		document.getElementById('dateControl_DDLDate').focus();
		if(sexflag == 'F')
		document.getElementById('date1_DDLDate').focus();
		if(sexflag == 'A')
		document.getElementById('date1_DDLDate').focus();
		return false
	}
	if (strYear.length != 4 || year==0 || year<minYear || year>maxYear)
	{
		alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear)
		 if(sexflag == 'M')
		document.getElementById('dateControl_DDLDate').focus();
		if(sexflag == 'F')
		document.getElementById('date1_DDLDate').focus();
		if(sexflag == 'A')
		document.getElementById('date1_DDLDate').focus();
		return false
	}
	if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false)
	{
		alert("Please enter a valid date")
		if(sexflag == 'M')
		document.getElementById('dateControl_DDLDate').focus();
		if(sexflag == 'F')
		document.getElementById('date1_DDLDate').focus();
		if(sexflag == 'A')
		document.getElementById('date1_DDLDate').focus();
		return false
	}
return true
}

/* Date Validation End Here */

WDAutoRefresh = function(frmName){
    this.objects = [];
    var tmpobjs = document.getElementsByName(frmName);
    for(var i=0; i<tmpobjs.length; i++){
        var tmpRef = tmpobjs[i].title;
        try{
            tmpRef = parseInt(tmpRef);
            if(tmpRef>0){
                setTimeout("wdAutoRefresh.refresh("+this.objects.length+","+tmpRef+");",tmpRef);
                this.objects.push(tmpobjs[i].parentNode);
            }
        } catch(ex) { }
    }
    this.refresh = function(idx,delay){
        bust = Math.floor(1000000*Math.random()+1);
        var tmp = this.objects[idx].innerHTML;
        this.objects[idx].innerHTML = "";
        this.objects[idx].innerHTML = tmp;
        setTimeout("wdAutoRefresh.refresh("+idx+","+delay+");",delay);
    }
}


function showChannelList(btn){
	    if(btn == "right")
		    {
			    document.getElementById('channelList1').style.display="none";
			    document.getElementById('channelList2').style.display="block";
			    document.getElementById('chLeft').className = "wdp_pointer";
			    document.getElementById('chRight').className = "wdp_pointerDisable";
			    document.getElementById('chLeft').src = urlPrefix + "/img/cm/themes/classic/lefArrow.gif";
			    document.getElementById('chRight').src = urlPrefix + "/img/cm/themes/classic/rightArrow_gray.gif";
    			
		    }
		    if(btn == "left")
		    {
			    document.getElementById('channelList2').style.display="none";
			    document.getElementById('channelList1').style.display="block";
			    document.getElementById('chLeft').className = "wdp_pointerDisable";
			    document.getElementById('chRight').className = "wdp_pointer";
			    document.getElementById('chLeft').src = urlPrefix + "/img/cm/themes/classic/lefArrow_gray.gif";
			    document.getElementById('chRight').src = urlPrefix + "/img/cm/themes/classic/rightArrow.gif";
		    }
    }
    function showList(id, num){
	    if (num==1)
	    {
		    var elementId = id;
		    document.getElementById('channelList').style.display = "none";
		    document.getElementById(elementId).style.display = "block";
	    }
    }
    function hideList(id, num){
	    if (num==1)
	    {
		    var elementId = id;
		    document.getElementById(elementId).style.display = "none";
		    document.getElementById('channelList').style.display = "block";
	    }
    }

var stdcss = 'global_old_classic';
var csspath = urlPrefix + '/includes/';
var nmcookie = 'chgcss';
function changeCSS(){
	var objEle = document.getElementsByTagName("link");
    var iCount=0;
    for(iCount=0;iCount<objEle.length;iCount++)
    {
       var objCss=objEle[iCount].href;
       if(objCss.indexOf('/global.css')!=-1)
       {
            var ncss = getCookie(nmcookie);
            if (ncss == null) {
		        ncss = stdcss;
	        }
	        else{
	            if(ncss=='global_classic')
	                ncss = stdcss;
	            else
	                ncss = ncss.replace('global','global_old');
	        }
	        document.write('<link rel="stylesheet" type"text/css" href="' + csspath + '' + ncss + '.css" media="screen">');
	        ncss='';
       }
    }
    return '';
}

function getCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

changeCSS();

/*Ramcharitmanas*/
function changeFontSize(x){
	var fontToApply = "font"+x;
	document.getElementById("ram").className = fontToApply;
	document.getElementById("tabTitle").className = "selectedTab";
}


function getActiveSwf(){
    var objects = document.getElementsByTagName("object");
    for (var i = 0; i < objects.length; i++){
        objects[i].outerHTML = objects[i].outerHTML;
    }
}