﻿function ajaxManager()
{  
    var args = ajaxManager.arguments;  
      switch (args[0]) 
       { 
       case "load_page":
                                // arg[0] ="load_page" ; arg[1]= url ; arg[2]= containerID; arg[3]= loading image position(height);
                             
                                var x=null;
                                try
                                  {
                                  // Firefox, Opera 8.0+, Safari
                                 
                                  x=new XMLHttpRequest();
                                  }
                                catch (e)
                                  {
                                  // Internet Explorer
                                  try
                                 {
                                    x=new ActiveXObject("Msxml2.XMLHTTP");
                                    }
                                  catch (e)
                                    { 
                                    x=new ActiveXObject("Microsoft.XMLHTTP");
                                    }
                                  }                          
                                if (x) 
                                { 
                                    x.onreadystatechange = function() 
                                    {        el = document.getElementById(args[2]);
                                              if (x.readyState == 4 && x.status == 200)
                                              {  
                                                        el.innerHTML="" 
                                                        el.innerHTML = x.responseText;                                                       
                                               } else{
                                                       if ((args[3]=="") || (args[3]==null))
                                                        {
                                                         var hi="650px" ;
                                                         } else{
                                                         var hi=args[3]+"px" ;
                                                         }
                                                       if ((args[4]=="") || (args[4]==null)) 
                                                         { 
                                                         var wi="400px";
                                                         } else{ 
                                                         var wi=args[4]+"px" ;
                                                         }
                                                       el.innerHTML="<div style='width:"+wi+";height:"+hi+"' align=center valign=middle><table cellpadding=0 cellspacing=0 border=0 width=100%><tr><td width="+wi+" height="+hi+" align=center valign=middle><img src=images/loading.gif><br>Loading content....<td></tr></div>";
                                               } 
                                     }          
                                 x.open("GET", args[1], true); 
                                 x.send(null); 
                                 }
                                 break;
        case "start_up": 
        
        }  
}

var XMLHttpRequestObject = false;

if (window.XMLHttpRequest) 
{
    XMLHttpRequestObject = new XMLHttpRequest();
}else if (window.ActiveXObject)
{
    XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");   
}

function ymenu()
{
  YAHOO.widget.onDOMReady = function(p_sType) {

               var aItems = [                
                    { text: "Phoewa Home", url: "http://www.phoewa.com"},    
                    { text: "Business [+]",url: "http://business.phoewa.com/business/", submenu: { id: "business", itemdata: [
                         { text: " Articles", url: "http://business.phoewa.com/business/articles.aspx" },
                         { text: "Interview", url: "http://business.phoewa.com/business/interviews.aspx" },
                         { text: "New Products", url: "http://business.phoewa.com/business/newproducts.aspx" },
                         { text: "Currency Converter", url: "http://business.phoewa.com/business/converter.aspx" }     
                    ] } },                  
                    { text: "Entertainment [+]",url: "http://entertainment.phoewa.com", submenu: { id: "entertainment", itemdata: [
                         { text: "Arts", url: "http://entertainment.phoewa.com/entertainment/arts.aspx" },
                         { text: "Movies", url: "http://entertainment.phoewa.com/entertainment/movies.aspx" },
                         { text: "Music", url: "http://entertainment.phoewa.com/entertainment/music.aspx" },
                         { text: "Talk Show", url: "http://entertainment.phoewa.com/entertainment/talkshow.aspx" }     
                    ] } },
                    { text: "Fashion  [+]", url: "http://fashion.phoewa.com",submenu: { id: "fashion", itemdata: [ 
                        { text: "Fashion", url: "http://fashion.phoewa.com/fn/ch/?gp=fashion" },
                        { text: "Beauty", url: "http://fashion.phoewa.com/fn/bt/?gp=beauty" },
                        { text: "Models", url: "http://fashion.phoewa.com/fn/md/?gp=models" },
                        { text: "Cover Story", url: "http://fashion.phoewa.com/fn/cs/?gp=cover_story" },  
                        { text: "Interview", url: "http://fashion.phoewa.com/fn/int/?gp=interview" }
                    ] } },
                   {text: "Forum ", url:"http://forum.phoewa.com"},
                   { text: "Horoscope [+]", url: "http://horoscope.phoewa.com",submenu: { id: "horo", itemdata: [ 
                         { text: "Articles", url: "http://horoscope.phoewa.com/horo/articles.aspx" },
                         { text: "Monthly Horoscope", url: "http://horoscope.phoewa.com/horo/monthly_horosocpe.aspx" }                        
                    ] } },
                   { text: "News [+]",url: "http://news.phoewa.com", submenu: { id: "news", itemdata: [
                        { text: "Local News ", url: "http://news.phoewa.com/news/?cat=local" },
                        { text: "International News ", url: "http://news.phoewa.com/news/?cat=International" },
                        { text: "Entertainment News ", url: "http://news.phoewa.com/news/?cat=entertainment" },
                        { text: "Sports News ", url: "http://news.phoewa.com/news/?cat=sports" },
                        { text: "Science & Technology", url: "http://news.phoewa.com/news/?cat=science" },
                        { text: "Business News", url: "http://news.phoewa.com/news/?cat=business" }
                    ] } },
                   { text: "Sports  [+]", url: "http://sports.phoewa.com",submenu: { id: "sports", itemdata: [ 
                        { text: "Football", url: "http://sports.phoewa.com/sports/football.aspx" },
                        { text: "Tennis", url: "http://sports.phoewa.com/sports/tennis.aspx" },
                        { text: "Golf", url: "http://sports.phoewa.com/sports/golf.aspx" },
                        { text: "Articles", url: "http://sports.phoewa.com/sports/articles.aspx" },
                        { text: "Live Scores", url: "http://sports.phoewa.com/sports/livescores.aspx" }
                    ] } },
                   { text: "Travels [+]", url: "http://travels.phoewa.com",submenu: { id: "travels", itemdata: [ 
                         { text: "Articles", url: "http://travels.phoewa.com/travels/article.aspx" },
                         { text: "Travel Tips", url: "http://travels.phoewa.com/travels/traveltip.aspx" },    
                         { text: "Directory", url: "http://travels.phoewa.com/travels/directory.aspx" }, 
                         { text: "Interesting Places", url: "http://travels.phoewa.com/travels/iplace.aspx" },    
                        { text: "Culture", url: "http://travels.phoewa.com/travels/culture.aspx" }                  
                    ] } }
                ];                

                var oMenu = new YAHOO.widget.Menu("PhoewaSubDomains", { x:200,y:15,width:"120px" });

                oMenu.addItems(aItems);

                oMenu.render(document.body);

                oMenu.showEvent.subscribe(function() {

                    this.focus();
                
                });   
                YAHOO.util.Event.addListener("menutoggle", "mouseover", oMenu.show, null, oMenu);
                YAHOO.util.Event.addListener("menutoggle", "click", oMenu.show, null, oMenu); 
                YAHOO.util.Event.addListener("Content", "mouseover", oMenu.hide, null, oMenu);                           
            };

YAHOO.util.Event.onContentReady("menutoggle", YAHOO.widget.onDOMReady);
         
}
function sphome()
{
  YAHOO.example.onDOMReady = function(p_sType) {

               var aItems = [
                
                    { text: "Football", url: "football.aspx",submenu: { id: "sp", itemdata: [ 
                    ] }},                    
                    { text: "Tennis", url: "tennis.aspx"},   
                    { text: "Golf", url: "golf.aspx"},
                    { text: "Articles", url: "articles.aspx"},   
                    { text: "Sports News", url: "news.aspx"} ,  
                    { text: "Live Scores", url: "livescores.aspx"}            

                ];                

                var oMenu = new YAHOO.widget.Menu("sphome", { x:77,y:124, width: 150});

                oMenu.addItems(aItems);

                oMenu.render(document.body);

                oMenu.showEvent.subscribe(function() {

                    this.focus();
                
                });

                

                YAHOO.util.Event.addListener("menusphome", "mouseover", oMenu.show, null, oMenu);                
                YAHOO.util.Event.addListener("Content", "mouseover", oMenu.hide, null, oMenu);      
               YAHOO.util.Event.addListener("menutoggle", "mouseover", oMenu.hide, null, oMenu); 
               YAHOO.util.Event.addListener("menufootball", "mouseover", oMenu.hide, null, oMenu); 
                YAHOO.util.Event.addListener("tblsub", "mouseover", oMenu.hide, null, oMenu);            
            };


            YAHOO.util.Event.onDOMReady(YAHOO.example.onDOMReady); 
}
function footballhome()
{
  YAHOO.example.onDOMReady = function(p_sType) {

               var aItems = [
                
                    { text: "Premier League", url: "premstand.aspx",submenu: { id: "ft", itemdata: [ 
                    ] }},
                    { text: "Series A", url: "seriesastand.aspx"},
                    { text: "Laliga", url: "laligastand.aspx"},   
                    { text: "Bundesliga", url: "bundesligastand.aspx"}, 
                    { text: "Champions League", url: "uefaclstand.aspx"}, 
                    { text: "Team Profiles", url: "teamprofiles.aspx"} ,  
                    { text: "Transfers", url: "transfers.aspx"}            

                ];                    

                var oMenu = new YAHOO.widget.Menu("spfootball", { x:203,y:124,width:150});

                oMenu.addItems(aItems);

                oMenu.render(document.body);

                oMenu.showEvent.subscribe(function() {

                    this.focus();
                
                });

                

                YAHOO.util.Event.addListener("menufootball", "mouseover", oMenu.show, null, oMenu);               
                YAHOO.util.Event.addListener("Content", "mouseover", oMenu.hide, null, oMenu);      
               YAHOO.util.Event.addListener("menutoggle", "mouseover", oMenu.hide, null, oMenu);   
               YAHOO.util.Event.addListener("menusphome", "mouseover", oMenu.hide, null, oMenu);   
               YAHOO.util.Event.addListener("tblsub", "mouseover", oMenu.hide, null, oMenu);           
            };


            YAHOO.util.Event.onDOMReady(YAHOO.example.onDOMReady); 
}



