<!--
// Use Freely as long as following disclaimer is intact ::
//---------------------------------------------------------------
// Cross Browser Multi-Orientation Menu v1.0 23rd October 2003
// This script written by Rik Comery. www.ricom.co.uk
// For support, visit the "Resources" section at www.ricom.co.uk
// All rights reserved.

var Menu = new Array ()
var subMenu = new Array ()

   Menu[0] = new Array("Home", "http://cartoonart.eu","_top")
     subMenu[0] = new Array()   
     subMenu[0][0] = new Array ("<li type=square>Cartoonart", "http://cartoonart.eu","_top")    
	 
   Menu[1] = new Array("News", "http://cartoonart.eu/News","_top") 
     subMenu[1] = new Array()
     subMenu[1][0] = new Array ("<li type=square>News", "http://cartoonart.eu/News","_top")
     subMenu[1][1] = new Array ("<li type=square>Day cartoon", "http://cartoonart.eu","_top")
     
   Menu[2] = new Array("Contests", "http://cartoonart.eu/Contests","_top")
     subMenu[2] = new Array()
	 subMenu[2][0] = new Array ("<li type=square>New", "http://cartoonart.eu/Contests","_top")
	 subMenu[2][1] = new Array ("<li type=square>Archives", "http://cartoonart.eu/Contests/Archives/index.php","_top")

   Menu[3] = new Array("Results", "http://cartoonart.eu/Results/index.php","_top")
     subMenu[3] = new Array() 
	 subMenu[3][0] = new Array ("<li type=square>New", "http://cartoonart.eu/Results/index.php","_top")
	 subMenu[3][1] = new Array ("<li type=square>2010", "http://cartoonart.eu/Results/index2010.php","_top")
	 subMenu[3][2] = new Array ("<li type=square>2009", "http://cartoonart.eu/Results/index2009.php","_top")

   Menu[4] = new Array("Cartoonists", "http://cartoonart.eu/Cartoonists","_top") 
     subMenu[4] = new Array()
	 subMenu[4][0] = new Array ("<li type=square>Cartoonists", "http://cartoonart.eu/Cartoonists","_top")

   Menu[5] = new Array("Animation", "http://cartoonart.eu/Animation","_top")
     subMenu[5] = new Array()
	 subMenu[5][0] = new Array ("<li type=square>Animation", "http://cartoonart.eu/Animation","_top")

   Menu[6] = new Array("Shop", "http://cartoonart.eu/Shop","_top")
     subMenu[6] = new Array()  	   
	 subMenu[6][0] = new Array ("<li type=square>Books", "http://cartoonart.eu/Shop","_top")
	 subMenu[6][1] = new Array ("<li type=square>Tshirts", "http://cartoonart.eu/Shop","_top")
  
  Menu[7] = new Array("Links", "http://cartoonart.eu/Links","_top") 
     subMenu[7] = new Array()
	 subMenu[7][0] = new Array ("<li type=square>Sites", "http://cartoonart.eu/Links","_top")
		 
   Menu[8] = new Array("Contact", "http://cartoonart.eu/Contact","_top")
     subMenu[8] = new Array()  
	 subMenu[8][0] = new Array ("<li type=square>Contact Us", "http://cartoonart.eu/Contact","_top")

Menu[9] = new Array("FECO", "http://cartoonart.eu/FECO/indexFECO.php","_top")
     subMenu[9] = new Array()  
	 subMenu[9][0] = new Array ("<li type=square>FECO BG", "http://cartoonart.eu/FECO/indexFECO.php","_top")
	 
 Menu[10] = new Array("Cartoon.bg", "http://cartoon.bg/","_top")
     subMenu[10] = new Array()  
	 subMenu[10][0] = new Array ("<li type=square>Cartoon.bg", "http://cartoon.bg/","_top")
   	 
////// FORMAT MENU  ///////////////////////////////////////////////////////////////////
orientation = "vertical"                 // Orientation of menu.  (horizontal, vertical)
cellPadding = 8                            // Cell Padding
cellBorder = 1                             // Include table border (for no border, enter 0)
verticalOffset = 0                         // Vertical offset of Sub Menu. (if set to 0, default offset will be used)
horizontalOffset = 100                      // Horizontal offset of Sub Menu. (if set to 0, default offset will be used)
subMenuDelay = 1                           // Time sub menu stays visible for (in seconds)

// Main Menu Items
borderColor = "#cccccc"                    // Border Colour 
menuBackground = ""                 // Cell Background Colour
menuHoverBackground = ""            // Cell Background Colour on mouse rollover
fontFace = "arial"                         // Font Face
fontColour = "#000000"                     // Font Colour
fontHoverColour = "#666666"                // Font Colour on mouse rollover
fontSize = "8pt"                           // Font Size
fontDecoration = "none"                    // Style of the link text (none, underline, overline, line-through)
fontWeight = "normal"                      // Font Weight (normal, bold)

// Sub Menu Items
sborderColor = "#38e8f3"                    // Border Colour 
smenuBackground = "#38e8f3"                 // Cell Background Colour
smenuHoverBackground = "#38e8f3"            // Cell Background Colour on mouse rolloverr
sfontFace = "arial"                         // Font Face
sfontColour = "#330000"                     // Font Colour
sfontHoverColour = "#"                // Font Colour on mouse rollover
sfontSize = "8pt"                           // Font Size
sfontDecoration = "none"                    // Style of the link text (none, underline, overline, line-through)
sfontWeight = "normal"                      // Font Weight (normal, bold)

////// DO NOT EDIT BELOW THIS LINE  ///////////////////////////////////////////////////////////////////

// Browser Sniffer
var isIE = (document.getElementById && document.all)?true:false;
var isNS4 = (document.layers)?true:false;
var isNS6 = (document.getElementById && !document.all)?true:false;

var timer
var obj = (isIE)?"document.all":"document.getElementById"

// Default horizontal and vertical offsets
if (verticalOffset == 0 || verticalOffset == "") 
{
  verticalOffset = (orientation=="horizontal")?20:5
}

if (horizontalOffset == 0 || horizontalOffset == "") 
{
  horizontalOffset = (orientation=="horizontal")?-1:70
}

// Menu Styles
document.writeln ('<style>');
document.writeln ('.rcMenuStatic {font-family:'+fontFace+';font-size:'+fontSize+';color:'+fontColour+';font-weight:'+fontWeight+';background-color:'+menuBackground+'; cursor:hand; text-decoration:'+fontDecoration+';z-index:0;}');
document.writeln ('.rcMenuHover  {font-family:'+fontFace+';font-size:'+fontSize+';color:'+fontHoverColour+';font-weight:'+fontWeight+';background-color:'+menuHoverBackground+'; cursor:hand; text-decoration:'+fontDecoration+';z-index:0;}');
document.writeln ('.rcSubMenuStatic {font-family:'+sfontFace+';font-size:'+sfontSize+';color:'+sfontColour+';font-weight:'+sfontWeight+';text-decoration:'+sfontDecoration+';background-color:'+smenuBackground+'; cursor:hand;z-index:0;}');
document.writeln ('.rcSubMenuHover  {font-family:'+sfontFace+';font-size:'+sfontSize+';color:'+sfontHoverColour+';font-weight:'+sfontWeight+';text-decoration:'+sfontDecoration+';background-color:'+smenuHoverBackground+'; cursor:hand;z-index:0;}');
document.writeln ('</style>');

// Build and show the main menu items
function showMenus()
{
  if (orientation == "vertical")
  {
    document.writeln ('<table border="0" cellpadding="0" cellspacing="'+cellBorder+'" bgColor="'+borderColor+'">')
  }
  else
  {
    document.writeln ('<table border="0" cellpadding="0" cellspacing="'+cellBorder+'" bgColor="'+borderColor+'"><tr>')
  }  
  for (x=0; x<Menu.length; x++)
  {
    if (orientation=="vertical") document.writeln('<tr>')
    document.writeln ('<td onclick="tdMouseClick(\'mainLink'+x+'\')" onMouseOver="hoverMenu(); popDown('+x+', \'button'+x+'\'); " onMouseOut="clearMenu('+x+')" ><div id="button'+x+'"><table border="0" width="130" height="30" cellpadding="'+cellPadding+'" cellspacing="0"><tr><td background="http://cartoonart.eu/images/button.gif" align="left" class="rcMenuStatic" id="cell'+x+'" nowrap>');
    document.writeln ('<a id="mainLink'+x+'" href="'+Menu[x][1]+'" target="'+Menu[x][2]+'" class="rcMenuStatic">'+Menu[x][0]+'</a></td>');
    document.writeln ('</tr></table></div></td>');    
    if (orientation=="vertical") document.writeln('</tr>')
  }
  if (orientation == "vertical")
  {
    document.writeln ('</table>');
  }
  else
  {
      document.writeln ('</tr></table>');
  }   

}  

// Build the sub menu items
  for (x=0; x<Menu.length; x++)
  { 
    if (subMenu[x].length > 0)
    {     
      document.writeln ('<div id="MENU'+x+'" style="visibility:hidden; position:absolute; z-index:2" >');
      document.writeln ('<table border="0" width="30%" cellpadding="'+cellPadding+'" cellspacing="'+cellBorder+'" bgColor="'+sborderColor+'"><tr>');
      for (y=0; y<subMenu[x].length; y++)
      {
        document.writeln ('<td id="subMenu'+x+y+'" class="rcSubMenuStatic" onMouseOver="hoverMenu(); highlightMenu(\'sub\','+x+','+y+')" onMouseOut="clearMenu('+x+');" onclick="tdMouseClick(\'subLink'+x+y+'\')" nowrap><a id="subLink'+x+y+'" href="'+subMenu[x][y][1]+'" target="'+subMenu[x][y][2]+'" class="rcSubMenuStatic">'+subMenu[x][y][0]+'</a></td>');
      }
      document.writeln ('</tr></table></div>');
    }
  }

// Change colour or menu and submenu items when the mouse hovers over.  
function highlightMenu(element,mainMenu,dropMenu,state)
{
  state=(state == "hover")?"rcMenuHover":"rcMenuStatic"
  if (element == "sub")
  {
    for (x=0; x < subMenu[mainMenu].length; x++)
    {
      eval(obj+'("subMenu'+mainMenu+x+'").className = "rcSubMenuStatic"')
      eval(obj+'("subLink'+mainMenu+x+'").className = "rcSubMenuStatic"')
    }
    eval(obj+'("subMenu'+mainMenu+dropMenu+'").className="rcSubMenuHover"')
    eval(obj+'("subLink'+mainMenu+dropMenu+'").className="rcSubMenuHover"')
  }
  else
  {
    eval(obj+'("cell'+mainMenu+'").className = "'+state+'"')
    eval(obj+'("mainLink'+mainMenu+'").className = "'+state+'"')
  }
}

// Find positioning for sub menus
function getOffset(obj, dim) 
{
  if(dim=="left") 
  {
    oLeft = obj.offsetLeft;
    while(obj.offsetParent!=null)
    {   
      oParent = obj.offsetParent
      oLeft += oParent.offsetLeft
      obj = oParent
    }
    return oLeft;
  }
  else if(dim=="top")
  {
    oTop = obj.offsetTop;
    while(obj.offsetParent!=null)
    {
      oParent = obj.offsetParent
      oTop += oParent.offsetTop
      obj = oParent
    }
    return oTop
  }
  else
  {
    alert("Error: invalid offset dimension '" + dim + "' in getOffset()")
    return false;
  }
}

// Show sub menus
function popDown(param, id)
{
  var menu;
  var button;

  if (id)
  {
    getOffset(eval(obj+'(id)'),'left');
    getOffset(eval(obj+'(id)'),'top');
  }
  n = 0;
  while (n < Menu.length)
  {

    //button = eval(obj+'("cell'+n+'")')
    menu = "MENU"+n
    if (param == n)
    {
        if (eval(obj+'(menu)'))
        {
          eval(obj+'(menu).style.visibility = "visible"')
          eval(obj+'(menu).style.left = oLeft + horizontalOffset;')
          eval(obj+'(menu).style.top = oTop + verticalOffset;')
        }
         highlightMenu('main',n,'','hover')
         if (subMenu[param].length > 0)
         {
           for (x=0; x<subMenu[param].length; x++)
           {
             eval (obj+'("subMenu'+param+x+'").className = "rcSubMenuStatic"')
             eval (obj+'("subLink'+param+x+'").className = "rcSubMenuStatic"')
           }
         }
      }
      else 
      {
        if (eval(obj+'(menu)'))
        {
          eval(obj+'(menu).style.visibility = "hidden"')
        }
        highlightMenu ('main',n,'','static')

      }
    n++
  }  
}

// Re-set timer for sub menus
function hoverMenu()
{
  if(timer)
  clearTimeout(timer)
}

// Set timer for sub menus
function clearMenu(menu)
{
  setDelay = subMenuDelay*1000
  delay = (subMenu[menu].length > 0)?setDelay:1
  
  timer = setTimeout("popDown("+(Menu.length + 1)+")",delay)
}

// when you click the box, perform the same function as if the user had clicked the hyperlink
function tdMouseClick(theElement)
{
  eval(obj+'(theElement).click()')
}
////// END MENU CODE  ///////////////////////////////////////////////////////////////////
//-->