// JavaScript Document
var OP5, NN4;
var dt = document;
OP5 = false;
NN4 = false;
if(navigator.appName == "Netscape"){
	NN4 = true;
}
if(navigator.appName == "Opera"){
	OP5 = true;
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function displayImage(picName, windowName, windowWidth, windowHeight){
  return window.open(picName,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + (parseInt(windowWidth)+20)  + ",height=" + (parseInt(windowHeight)+20)) 
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function displayImage(picName, windowName, windowWidth, windowHeight){
  return window.open(picName,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + (parseInt(windowWidth)+20)  + ",height=" + (parseInt(windowHeight)+20)) 
}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=700,height=560');");
}




function createSubMenu(sid){
	var tblsub, padding;
	
	padding = "10";
	
	switch(sid)
	{
		
		case "portfolio1sub":{

			tblsub = "<table id='" + sid + "' cellspacing='0' cellpadding='0' border='0' frame='hsides' bordercolor='#990000' style='position:absolute; width:110px;visibility:hidden; font-size:12px; margin-left:-5px; margin-top:-15px' class='dyncell1'>";
			tblsub = tblsub + "<tr align='center'>";
			tblsub = tblsub + "<td valign='middle' align='left' class='dyncell2'>";
			tblsub = tblsub + "<a href='Products1.aspx''' align='left'>";
			tblsub = tblsub + "&nbsp;Bottles&nbsp;</div>";
			tblsub = tblsub + "</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "<td>";

			
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='middle' align='left' height='1px' bgcolor='#990000'>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";

			
			tblsub = tblsub + "<tr align='center'>";
			tblsub = tblsub + "<td valign='middle' align='left' class='dyncell2'>";
			tblsub = tblsub + "<a href='Products2.aspx''' align='left'>";
			tblsub = tblsub + "&nbsp;Binky&nbsp;Pacifiers&nbsp;</div>";
			tblsub = tblsub + "</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			
			tblsub = tblsub + "<tr>";
			tblsub = tblsub + "<td valign='middle' align='left' height='1px' bgcolor='#990000'>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";
			
			
			tblsub = tblsub + "<tr align='center'>";
			tblsub = tblsub + "<td valign='middle' align='left' class='dyncell2'>";
			tblsub = tblsub + "<a href='Products3.aspx''' align='left'>";
			tblsub = tblsub + "&nbsp;Cups&nbsp;&&nbsp;Mealtimes&nbsp;</div>";
			tblsub = tblsub + "</a>";
			tblsub = tblsub + "</td>";
			tblsub = tblsub + "</tr>";

			break;
		}
		
		
		
		
			}
	tblsub = tblsub + "</table>";
	//alert(tblsub);
	return tblsub;
}


function fixMenu(show){
	var tbl, submenu, mainmenu;
	var padding;
	padding = "0";
	switch(show)
	{
		

		
		case "MainMenu3":{
			submenu = "portfolio1sub";
			mainmenu = "tblnav5";
			tbl = "<table id='" + mainmenu + "' cellspacing='0' cellpadding='0' border='0'>";
			tbl = tbl + "<tr>";
			tbl = tbl + "<td align='left' valign='top' class='begin' onmouseover=\"javascript:document.getElementById('" + submenu + "').style.visibility='visible';\" onmouseout=\"javascript:document.getElementById('" + submenu + "').style.visibility='hidden';\">";
			//tbl = tbl + "<a href='#'>";
			//tbl = tbl + "<img src='images/transparent.gif' border='0' width='" + padding + "' height='1'>";
			tbl = tbl + "<a href=\"Products1.aspx\" onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('Image3','','images/pic_products_01.jpg',1)\">";
			
			tbl = tbl + "<img src='images/pic_products.jpg' name='Image3' border='0' id='Image3'>";
			
			tbl = tbl + "</a>";
			tbl = tbl + "<br />"; //This line will make the submenu appear below the main one
			tbl = tbl + createSubMenu(submenu);
			tbl = tbl + "</td>";
			tbl = tbl + "</tr>";
			tbl = tbl + "</table>";
			break;
		}
		
			
		
		
		
}
	dt.write(tbl);
	//alert(tbl);
}




// <script>

// Copyright (C) 2005 Ilya S. Lyubinskiy. All rights reserved.
// Technical support: http://www.php-development.ru/
//
// YOU MAY NOT
// (1) Remove or modify this copyright notice.
// (2) Distribute this code, any part or any modified version of it.
//     Instead, you can link to the homepage of this code:
//     http://www.php-development.ru/javascripts/menu.php.
//
// YOU MAY
// (1) Use this code on your website.
// (2) Use this code as a part of another product provided that
//     its main use is not creating javascript menus.
//
// NO WARRANTY
// This code is provided "as is" without warranty of any kind, either
// expressed or implied, including, but not limited to, the implied warranties
// of merchantability and fitness for a particular purpose. You expressly
// acknowledge and agree that use of this code is at your own risk.


function at_display(x)
{
  var win = window.open();
  for (var i in x) win.document.write(i+' = '+x[i]+'<br />');
}

// ***** DropDown Box **********************************************************

var at_timeout = 50;

// ***** Show Aux *****

function at_show_aux(parent, child)
{
  var p = document.getElementById(parent);
  var c = document.getElementById(child);

  p.className        = "active";

  if (c.offsetWidth <= 0)
  {
    c.style.position   = "absolute";
    c.style.visibility = "visible";
    c.style.display    = "block";
  }

  var direction = undefined;
  if (p.parentNode && p.parentNode["at_position"] == "x")
    direction = p.parentNode["at_direction"];

  var top   = (c["at_position"] == "y") ?  p.offsetHeight : 0;
  var left1 = (c["at_position"] == "x") ?  p.offsetWidth  : 0;
  var left2 = (c["at_position"] == "x") ? -c.offsetWidth  : 0;
  var left3 = (c["at_position"] == "x") ?  p.offsetWidth  : 0;

  for (; p; p = p.offsetParent)
  {
    if (p.style.position != 'absolute')
    {
      left1 += p.offsetLeft;
      left2 += p.offsetLeft;
      top   += p.offsetTop;
    }
    left3 += p.offsetLeft;
  }

  if (direction)
  {
    left = (direction == 'right') ? left1 : left2;
    c['at_direction'] = direction;
  }
  else
  {
    left = (left3+c.offsetWidth < document.body.offsetWidth) ? left1 : left2;
    c['at_direction'] = (left3+c.offsetWidth < document.body.offsetWidth) ? 'right' : 'left';
  }

  c.style.position   = "absolute";
  c.style.visibility = "visible";
  c.style.display    = "block";
  c.style.top        = top +'px';
  c.style.left       = left+'px';
}

// ***** Hide Aux *****

function at_hide_aux(parent, child)
{
  document.getElementById(parent).className        = "parent";
  document.getElementById(child ).style.visibility = "hidden";
  document.getElementById(child ).style.display    = "block";
}

// ***** Show *****

function at_show(e)
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);

  at_show_aux(p.id, c.id);

  clearTimeout(c["at_timeout"]);
}

// ***** Hide *****

function at_hide()
{
  var c = document.getElementById(this["at_child"]);

  c["at_timeout"] = setTimeout("at_hide_aux('"+this["at_parent"]+"', '"+this["at_child" ]+"')", at_timeout);
}

// ***** Attach *****

function at_attach(parent, child, position)
{
  p = document.getElementById(parent);
  c = document.getElementById(child );

  p["at_child"]    = c.id;
  c["at_child"]    = c.id;
  p["at_parent"]   = p.id;
  c["at_parent"]   = p.id;
  c["at_position"] = position;

  p.onmouseover = at_show;
  p.onmouseout  = at_hide;
  c.onmouseover = at_show;
  c.onmouseout  = at_hide;
}

// ***** DropDown Menu *********************************************************

// ***** Build Aux *****

function dhtmlmenu_build_aux(parent, child, position)
{
  document.getElementById(parent).className = "parent";

  document.write('<div class="vert_menu" id="'+parent+'_child">');

  var n = 0;
  for (var i in child)
  {
    if (i == '-')
    {
      document.getElementById(parent).href = child[i];
      continue;
    }

    if (typeof child[i] == "object")
    {
      document.write('<a class="parent" id="'+parent+'_'+n+'">'+i+'</a>');
      dhtmlmenu_build_aux(parent+'_'+n, child[i], "x");
    }
    else document.write('<a id="'+parent+'_'+n+'" href="'+child[i]+'">'+i+'</a>');
    n++;
  }

  document.write('</div>');

  at_attach(parent, parent+"_child", position);
}

// ***** Build *****

function dhtmlmenu_build(menu)
{
  for (var i in menu) dhtmlmenu_build_aux(i, menu[i], "y");
}
function menu_services(menu){


var submenu_services = { "&nbsp;Machinery/Equipment&nbsp;Grout"    : "cpcasia_machinery_equipment_Grout.aspx",
                         "&nbsp;Industrial&nbsp;Flooring"    : "cpcasia_industrial_Flooring.aspx",
                         "&nbsp;Chemical&nbsp;Resistant"   : "cpcasia_Chemical_resistant.aspx",
                         "&nbsp;Blasting&nbsp;&&nbsp;Painting"    : "cpcasia_Blasting.aspx" };

var menu = { "menu_services" : submenu_services };

dhtmlmenu_build(menu);

}
