/*	
	Copyright 2006 Adobe Systems Incorporated.
	Dynamic UI Javascript (in development)
	$Revision: 1.19 $
*/
function makePodElem(elem,bodyID,stylefirst,handleContentAsText)
{
var
prevElem = null,
skinElements = {
'nw':{"elem":elem.cloneNode(false),"cssname":(elem.className.replace("dyn-pod","pod")+' nw')},
'ne':{"elem":CachedElement.create('div'),"cssname":'ne'},
'se':{"elem":CachedElement.create('div'),"cssname":'se'},
'sw':{"elem":CachedElement.create('div'),"cssname":'sw'},
'n':{"elem":CachedElement.create('div'),"cssname":'n'},
's':{"elem":CachedElement.create('div'),"cssname":'s'},
'w':{"elem":CachedElement.create('div'),"cssname":'w'},
'e':{"elem":((handleContentAsText)? CachedElement.create('DIV') : elem.cloneNode(true)),"cssname":'pod-body e'}
};

if(handleContentAsText) skinElements.e.elem.innerHTML = elem.innerHTML;
for(prop in skinElements)
{	 
skinElements[prop].elem.className =  skinElements[prop].cssname;
if(prevElem) prevElem.elem.appendChild(skinElements[prop].elem); 
prevElem = skinElements[prop];
}
return { rootelem:skinElements.nw.elem, bodyelem:skinElements.e.elem };
}


function buildPodLib(roots)
{
	return roots;
}

var dAttrBindings = {
"pods": { 
registered:0,
id:'root', 
key: 'className', 
value:'dyn-pod', 
tags: ['div'], 
method: buildPodLib
}
};

UI = function(data)
{
this.data = data;
}

UI.prototype.init = function()
{
return true
}



com.adobe.ui = new UI(dAttrBindings);
registerOnReady( function() { com.adobe.ui.init() }, writeFOArr);


var deadLine	= 50;
var closetimer	= 0;
var lastmenuItem	= 0;
var lastbutton ;


function displayMenu(id,idH)
{	
	
	cancelClose();

	
	if(lastmenuItem){
		lastmenuItem.style.visibility = 'hidden';
		releaseB(lastbutton);
		
	}

	
	lastmenuItem = document.getElementById(id);
	lastmenuItem.style.visibility = 'visible';
	lastbutton = idH;

}

function hideMenu(idH)
{
	if(lastmenuItem) {
		lastmenuItem.style.visibility = 'hidden';
		releaseB(idH);
	}
}


function menuClose(idH)
{
	
	closetimer = window.setTimeout("hideMenu('"+idH+"')", deadLine);
}


function cancelClose()
{
	if(closetimer)
	{
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}

function submitB(id){
	
	var imgItem = document.getElementById(id);
	var img = document.getElementById("mainImage");
	
	
	if(id == 'serviceB'){
		imgItem.setAttribute("src","img/img_btservicedown.gif");
		//img.setAttribute("src","img/img_topservice.gif");
		//img.setAttribute("height","100px");
	}
	if(id == 'solutionB'){
		imgItem.setAttribute("src","img/img_btsolutionsdown.gif");
		//img.setAttribute("src","img/img_topsolutions.gif");
		//img.setAttribute("height","100px");
	}
	if(id == 'softwareB'){
		imgItem.setAttribute("src","img/img_btsoftwaredown.gif");
		//img.setAttribute("src","img/img_topsoftware.gif");
		//img.setAttribute("height","100px");
	}
	if(id == 'productB'){
		imgItem.setAttribute("src","img/img_btproductsdown.gif");
		//img.setAttribute("src","img/img_topsproducts.gif");
		//img.setAttribute("height","100px");
	}
	if(id == 'supportB'){
	    imgItem.setAttribute("src","img/img_btsupportdown.gif");
		//img.setAttribute("src","img/img_topssupport.gif");
		//img.setAttribute("height","100px");
	}
	if(id == 'clientB'){
		imgItem.setAttribute("src","img/img_btclientsdown.gif");
		//img.setAttribute("src","img/img_topsclients.gif");
		//img.setAttribute("height","100px");
	}
	if(id == 'contactB'){
		imgItem.setAttribute("src","img/img_btcontactusdown.gif");
		//img.setAttribute("src","img/img_topscontactus.gif");
		//img.setAttribute("height","100px");
	}
	if(id == 'companyB'){
		imgItem.setAttribute("src","img/img_btcompanydown.gif");
		//img.setAttribute("src","img/img_middle.gif");
		//img.setAttribute("height","200px");
	}
	
}
function releaseB(id){
	
	var imgItem = document.getElementById(id);
	var img = document.getElementById("mainImage");
	if(id == 'serviceB')
		imgItem.setAttribute("src","img/img_btserviceup.gif");
	if(id == 'solutionB')
		imgItem.setAttribute("src","img/img_btsolutionsup.gif");
	if(id == 'softwareB')
		imgItem.setAttribute("src","img/img_btsoftwareup.gif");
	if(id == 'productB')
		imgItem.setAttribute("src","img/img_btproductsup.gif");	
	if(id == 'supportB')
	    imgItem.setAttribute("src","img/img_btsupportup.gif");
	if(id == 'clientB')
		imgItem.setAttribute("src","img/img_btclientsup.gif");
	if(id == 'contactB')
		imgItem.setAttribute("src","img/img_btcontactusup.gif");
	if(id == 'companyB')
		imgItem.setAttribute("src","img/img_btcompanyup.gif");
	
	
}


function displayMService(){
	
	var div = document.getElementById("textContent");
	var img = document.getElementById("mainImage");
	var ajaxObject = ajaxConnection();
	ajaxObject.open("GET", "txt/mService.html",true);
	ajaxObject.onreadystatechange=function() {
		if (ajaxObject.readyState==4) {
			div.innerHTML = ajaxObject.responseText;
			img.setAttribute("src","img/img_topmservice.gif");
			img.height= "100";
	 	}
	}

	
	ajaxObject.send(null);

}

function displayTService(){
	var div = document.getElementById("textContent");
	var img = document.getElementById("mainImage");
	var ajaxObject = ajaxConnection();
	ajaxObject.open("GET", "txt/tService.html",true);
	ajaxObject.onreadystatechange=function() {
		if (ajaxObject.readyState==4) {
			div.innerHTML = ajaxObject.responseText;
			img.setAttribute("src","img/img_toptservice.gif");
			img.height= "100";
	 	}
	}

	
	ajaxObject.send(null);

}
function displayP(){
	var div = document.getElementById("textContent");
	var img = document.getElementById("mainImage");
	var ajaxObject = ajaxConnection();
	ajaxObject.open("GET", "txt/projects.html",true);
	ajaxObject.onreadystatechange=function() {
		if (ajaxObject.readyState==4) {
			div.innerHTML = ajaxObject.responseText;
			img.setAttribute("src","img/img_topservice.gif");
			img.height= "100";
	 	}
	}

	
	ajaxObject.send(null);

	
}
function displayCompany(){
	var div = document.getElementById("textContent");
	var img = document.getElementById("mainImage");
	var ajaxObject = ajaxConnection();
	ajaxObject.open("GET", "txt/company.html",true);
	ajaxObject.onreadystatechange=function() {
		if (ajaxObject.readyState==4) {
			div.innerHTML = ajaxObject.responseText;
			img.setAttribute("src","img/img_topcompany.gif");
			img.height= "200";
	 	}
	}

	
	ajaxObject.send(null);

	
}
function displayEnterpriseSol(){
	var div = document.getElementById("textContent");
	var img = document.getElementById("mainImage");
	var ajaxObject = ajaxConnection();
	ajaxObject.open("GET", "txt/enterpriseSol.html",true);
	ajaxObject.onreadystatechange=function() {
		if (ajaxObject.readyState==4) {
			div.innerHTML = ajaxObject.responseText;
			img.setAttribute("src","img/img_topsolutions.gif");
			img.height= "100";
	 	}
	}

	
	ajaxObject.send(null);

	
}
function displayNetworkSol(){
	var div = document.getElementById("textContent");
	var img = document.getElementById("mainImage");
	var ajaxObject = ajaxConnection();
	ajaxObject.open("GET", "txt/networkSol.html",true);
	ajaxObject.onreadystatechange=function() {
		if (ajaxObject.readyState==4) {
			div.innerHTML = ajaxObject.responseText;
			img.setAttribute("src","img/img_topsolutions.gif");
			img.height= "100";
	 	}
	}

	
	ajaxObject.send(null);

	
}
function displayMainProducts(){
	var div = document.getElementById("textContent");
	var img = document.getElementById("mainImage");
	var ajaxObject = ajaxConnection();
	ajaxObject.open("GET", "txt/mProducts.html",true);
	ajaxObject.onreadystatechange=function() {
		if (ajaxObject.readyState==4) {
			div.innerHTML = ajaxObject.responseText;
			img.setAttribute("src","img/img_topproducts.gif");
			img.height= "100";
	 	}
	}

	
	ajaxObject.send(null);

	
}
function displayCustomerSupport(){
	var div = document.getElementById("textContent");
	var img = document.getElementById("mainImage");
	var ajaxObject = ajaxConnection();
	ajaxObject.open("GET", "txt/customerSupport.html",true);
	ajaxObject.onreadystatechange=function() {
		if (ajaxObject.readyState==4) {
			div.innerHTML = ajaxObject.responseText;
			img.setAttribute("src","img/img_topsupport.gif");
			img.height= "100";
	 	}
	}

	
	ajaxObject.send(null);

	
}
function displayMaintenance(){
	var div = document.getElementById("textContent");
	var img = document.getElementById("mainImage");
	var ajaxObject = ajaxConnection();
	ajaxObject.open("GET", "txt/maintenance.html",true);
	ajaxObject.onreadystatechange=function() {
		if (ajaxObject.readyState==4) {
			div.innerHTML = ajaxObject.responseText;
			img.setAttribute("src","img/img_topsupport.gif");
			img.height= "100";
	 	}
	}

	
	ajaxObject.send(null);

	
}
function displayClients(){
	var div = document.getElementById("textContent");
	var img = document.getElementById("mainImage");
	var ajaxObject = ajaxConnection();
	ajaxObject.open("GET", "txt/clients.html",true);
	ajaxObject.onreadystatechange=function() {
		if (ajaxObject.readyState==4) {
			div.innerHTML = ajaxObject.responseText;
			img.setAttribute("src","img/img_topclients.gif");
			img.height= "100";
	 	}
	}

	
	ajaxObject.send(null);

	
}
function displayContactUs(){
	var div = document.getElementById("textContent");
	var img = document.getElementById("mainImage");
	var ajaxObject = ajaxConnection();
	ajaxObject.open("GET", "txt/contactus.html",true);
	ajaxObject.onreadystatechange=function() {
		if (ajaxObject.readyState==4) {
			div.innerHTML = ajaxObject.responseText;
			img.setAttribute("src","img/img_topcontactus.gif");
			img.height= "100";
	 	}
	}

	
	ajaxObject.send(null);

	
}
function displayOurTools(){
	var div = document.getElementById("textContent");
	var img = document.getElementById("mainImage");
	var ajaxObject = ajaxConnection();
	ajaxObject.open("GET", "txt/ourTools.html",true);
	ajaxObject.onreadystatechange=function() {
		if (ajaxObject.readyState==4) {
			div.innerHTML = ajaxObject.responseText;
			img.setAttribute("src","img/img_topsoftware.gif");
			img.height= "100";
	 	}
	}

	
	ajaxObject.send(null);

	
}
function displayCustomerTools(){
	var div = document.getElementById("textContent");
	var img = document.getElementById("mainImage");
	var ajaxObject = ajaxConnection();
	ajaxObject.open("GET", "txt/customerTool.html",true);
	ajaxObject.onreadystatechange=function() {
		if (ajaxObject.readyState==4) {
			div.innerHTML = ajaxObject.responseText;
			img.setAttribute("src","img/img_topsoftware.gif");
			img.height= "100";
	 	}
	}

	
	ajaxObject.send(null);

	
}



