/*      oriaskit.es Global JS Library      */

/* Tool tip code */

//**************Handling this at the Primary.master.cs file level*************
//Changed 12/4 by John Beutler
//****************************************************************************
var toolTipLeft;
var toolTipRightPos;
var toolTipTopPos;
var toolTipBottomPos;
//var toolTipString;
var toolTipOpenLeft;


toolTipString =  "<br/>CALL TOLL FREE<br/>";
toolTipString += "US/Canada<br/>800-547-7827<br/><br/>";
toolTipString += "SUBMIT REQUEST ONLINE<br/><a href=\"/company/about/inforequest.html\" onClick=\"hideToolTip();\">Online Request Form</a>";

var DEFAULT_WIDTH = 760;
//var popupArr = new Array();
var popup;
function DivWindow(id,width,height,top,left,url) {
	this.id = id;
	this.type = "image";
	this.width = width;
	this.height = height;
	this.top = top;
	this.left = left;
	this.url = url;
}
function BodyObject(width,height,offsetX) {
	this.width = width;
	this.height = height;
	this.offsetX = offsetX;
}

function createDivWindow()
{
    var DIV = document.createElement( "DIV" );
    DIV.setAttribute( "class", 'divWindow' );
    DIV.setAttribute( "id", 'window1' );
    DIV.innerHTML = '<div class="divHeader" align="right"><div class="dhRight" onClick="closeDivWindow(\'window1\');"></div></div>\n' +
                    '<div id="window1_iframe" class="divIframe"></div>\n';

    document.body.appendChild( DIV );
//    DIV.style.visibility = 'hidden';
    DIV.style.position = 'absolute';
    repositionDivWindow();
}

function openDivWindow(id,width,height,top,left,url) {
	//if ( (popupArr[id] == undefined ) || (popupArr[id] == null ) ){

	popup = new DivWindow(id,width,height,top,left,url);
	//}
	div = document.getElementById(id);
  if ( !div )
  {
    createDivWindow();
  	div = document.getElementById(id);
    repositionDivWindow();
  }
    
	positionDivWindow(id);
	div.style.width = (popup.width)+"px";
	div.style.height = (15 + popup.height)+"px";
	div.style.display = "block";
	//content = div.firstChild;
	innerdiv = document.getElementById(id+"_iframe");
	innerdiv.width = popup.width;
	innerdiv.height = popup.height;
	innerdiv.innerHTML = "<iframe src='"+popup.url+"' width='100%' height='100%' border='0' scrolling='no' frameborder='0' marginwidth='0' marginheight='0' style='overflow:hidden;'></iframe>";
	//alert(content);
	//content.src = popup.url;
}

//Function to Open Logo Terms Window
function openWindow(linkObj, top) { 
	logoFile = "/images/company/logofiles/" + linkObj.title;
	
	id = 'window1';
	popup = new DivWindow('window1',680,450,top,50,"logoterms.html");
	div = document.getElementById(id);   
	positionDivWindow(id);
	div.style.width = (popup.width)+"px";
	div.style.height = (15 + popup.height)+"px";
	div.style.display = "block";
	innerdiv = document.getElementById(id+"_iframe");
	innerdiv.width = popup.width;
	innerdiv.height = popup.height;
	innerdiv.innerHTML = "<iframe src='"+popup.url+"' width='100%' height='100%' border='0' scrolling='no' frameborder='0' marginwidth='0' marginheight='0'></iframe>";
}
 
function closeDivWindow(id) {
	div = document.getElementById(id);
	div.style.display = "none";
	innerdiv = document.getElementById(id+"_iframe");
	innerdiv.innerHTML = "";
}

//Function to Close Logo Terms Window 
function closeLogoWindow(agreeBool) {
	
	div = document.getElementById('window1');
	div.style.display = "none";
	innerdiv = document.getElementById('window1'+"_iframe");
	innerdiv.innerHTML = "";
	
	if (agreeBool == 1) {
		var domainName = getDomainName(document.URL) 
		window.location = "http://" + domainName + logoFile;
	} 
}

function positionDivWindow(id){
	var bodyObj;
	bodyObj = getBodyDimension();

	div = document.getElementById(id);
	div.style.top = popup.top+"px";
	div.style.left = (bodyObj.offsetX + popup.left)+"px";
}
function repositionDivWindow(){

	if (document.getElementById('window1').style.display != "none" ){
		positionDivWindow('window1');
	}
	
//	positionToolTip();
}

// code for tooltip BEGIN


function showToolTip(e,text){}
/*  Disable for now
function showToolTip(e,text){
		var bodyObj;
		bodyObj = getBodyDimension();
		if(document.all)
			e = event;
		
		var obj = document.getElementById('bubble_tooltip');
		var obj2 = document.getElementById('bubble_tooltip_content');
		obj2.innerHTML = text;
		obj.style.display = 'block';
		
		var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
		if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)
			st=0; 
		var leftPos = e.clientX - 250;
		if(leftPos<0)
			leftPos = 0;
		obj.style.left = leftPos + 'px';
		//We'll want to put some logic in here for positioning of elements...
		//obj.style.top = e.clientY - obj.offsetHeight -1 + st + 'px';
		obj.style.top = e.clientY -20 + st + 'px';

    
	    //Get the nodes' properties
	    	ddWidth = obj.offsetWidth;
    		ddHeight = obj.offsetHeight;
    		ddX = findPosX(obj);
    		ddY = findPosY(obj);
    		ddMargin = document.getElementById('wrapper').offsetLeft;

	    //Calculate the coordinates of the space outside of the dropdown.
	    //Used when the cursor is clicked outside of the tooltip area to close it...
    	toolTipLeft = ddX;
		toolTipRightPos = toolTipLeft + obj.offsetWidth;
		toolTipTopPos = ddY;
		toolTipBottomPos = toolTipTopPos + obj.offsetHeight;

		toolTipOpenLeft = obj.offsetLeft - bodyObj.offsetX;
		if(document.getElementById('ctl00_PrimaryBody_ctl00_ddlSelectCountry'))
		{
		    document.getElementById('ctl00_PrimaryBody_ctl00_ddlSelectCountry').style.display = 'none';
		}
		
	}	
*/
	function getBodyDimension(){
		var w,h,ox;
		if (self.innerHeight) // all except Explorer
		{
			w = self.innerWidth;
			h = self.innerHeight;
		}
		else if (document.documentElement && document.documentElement.clientHeight)
			// Explorer 6 Strict Mode
		{
			w = document.documentElement.clientWidth;
			h = document.documentElement.clientHeight;
		}
		else if (document.body) // other Explorers
		{
			w = document.body.clientWidth;
			h = document.body.clientHeight;
		}
		if (w < DEFAULT_WIDTH){
			ox = 0;
		} else {
			ox = (w - DEFAULT_WIDTH) / 2;
		}
		var bodyDimension = new BodyObject(w,h,ox);
		return bodyDimension;
	}
	function positionToolTip()
	{
		var obj = document.getElementById('bubble_tooltip');
		if (obj.style.display == "block"){
			var bodyObj;
			bodyObj = getBodyDimension();
			
				//alert(obj.offsetLeft);
			obj.style.left = (toolTipOpenLeft + bodyObj.offsetX) + 'px';
		}
		
	}
	function blurToolTip(obj)
	{
		if(cursorX < toolTipLeft || (cursorX > (toolTipRightPos + 70)) || cursorY < toolTipTopPos || cursorY > toolTipBottomPos)
			hideToolTip();
	}

	function hideToolTip()
	{
		document.getElementById('bubble_tooltip').style.display = 'none';
		
		if(document.getElementById('ctl00_PrimaryBody_ctl00_ddlSelectCountry'))
		{
		    document.getElementById('ctl00_PrimaryBody_ctl00_ddlSelectCountry').style.display = 'block';
		}
		
	}
	
// Code for tooltip end
  
  
function tabFix()
{

}
  
/* ##### Column navigation - FAQ of the Day ##### */
var current = 0;
var faqContent = new Array;


function getFAQContent() {
faqContentObj = document.getElementById("faqHiddenContent");
faqNode = faqContentObj.firstChild
var i = 0;
var j = 0;
var faqNodeArray = new Array()

while(faqNode) {
	if(faqNode.nodeType == 1) {
		faqNodeArray[i] = new Array()
		faqChild = faqNode.firstChild
			while(faqChild) {
				if(faqChild.nodeType == 1) {
					faqNodeArray[i][j] = faqChild.innerHTML;
					j = j + 1;
				}
				faqChild = faqChild.nextSibling;
			}
		j = 0;
		i = i + 1;
		}	
	faqNode = faqNode.nextSibling;
	}
	return faqNodeArray
}



function loadFaq() {
	
	faqContent = getFAQContent();

	if (faqContent.length <= 1) {
		document.getElementById('faqNav').style.display = "none";
	} else {
		document.getElementById('faqNav').style.display = "block";
		document.getElementById("buttonPrev").style.display = "none";
	}
	document.getElementById('faqHeader').innerHTML = faqContent[0][0];
	document.getElementById('faqContent').innerHTML = faqContent[0][1];
}



function columnNav(direction) 
{

    if (direction=="start") 
    {
        document.getElementById("buttonPrev").style.display = "none";
    }
    else if (direction=="next") 
    {
        current++;
    }
    else if (direction=="prev") 
    {
        current=current-1;
    }
			
   	// Get Content from DIv tags 
		faqContent = getFAQContent();
	
    document.getElementById('faqHeader').innerHTML = faqContent[current][0];
    document.getElementById('faqContent').innerHTML = faqContent[current][1];	
    document.getElementById("buttonPrev").style.display = "block";
    document.getElementById("buttonNext").style.display = "block";
    
    if (current <= 0) 
    {
        document.getElementById("buttonPrev").style.display = "none";
    }
    
    if (current == (faqContent.length-1)) 
    {
        document.getElementById("buttonNext").style.display = "none";
    }
}


/*
##### Dropdowns #####
##### v1.0 8/06 www.louddog.com
Custom styled dhtml <select> replacement. Permits full CSS control of dropdown visual style.
Built for IE6+ Firefox1.5+
Works in NN&+ and Safari2.0+, but currently disabled to address dhtml/flash layer bug (js function swapHtml)
Consists of:
    mouse event -   used with blurDD. Detetcs if cursor is clicked outside of opened dropdown, 
                    and closes it. Loaded as an onclick event handler in the <body> tag.
    showDD -        open dropdown
    hideDD -        close dropdown
    blurDD -        Uses coordinates passed from showDD to determine the space 
                    outside of the dropdown. If mouse event occurs outside of the 
                    open dropdown, it closes.
In the markup, the dropdown is built as an unordered list (<ul>) nested in 
a <div class="dropdown">.

*/
var ddState; //Flags the display status of the drop-down to close when clicked outside
//Information about the dimensions and position of dropdown.
//Enables the DOM to sense if the cursor is clicked outside of the dropdown, to close it.
var ddWidth;
var ddHeight;
var ddX;
var ddY;
var ddMargin;
var leftPos;
var rightPos;
var topPos;
var bottomPos;



//Detect the position of the mouse cursor.
//Used to calculate if the cursor is clicked outside of the dropdown to close it.
if (!document.all) 
    document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = getMouseXY;

function getMouseXY(e) 
{
    if (document.all ) 
    {
      if ( typeof( event ) != 'undefined' ) 
      {
//        cursorX = event.clientX + document.body.scrollLeft
//        cursorY = event.clientY + document.body.scrollTop
        cursorX = event.clientX
        cursorY = event.clientY
      } 
    } 
    else 
    {
        cursorX = e.pageX
        cursorY = e.pageY
    }  
}

function findPosX(obj) 
{
    var curleft = 0;
    
    while (obj.offsetParent) 
    {
        curleft += obj.offsetLeft;
    	obj = obj.offsetParent;
	}
    
    return curleft;
}
function findPosY(obj) 
{
    var curtop = 0;
    
    while (obj.offsetParent) 
    {
    	curtop += obj.offsetTop
    	obj = obj.offsetParent;
	}
    return curtop;
}




// Display dropdown when the "closed" state is clicked
function showDD(obj) 
{
		//alert(document.body.clientHeight)
		var buttonWidth = 20 //the width of the open/close graphic button, to include in width calculations
    
    //Traverse the tree to identify the nodes that will be manipulated
    
    var block = obj.getAttribute("id");
    var findUl = document.getElementById(block).getElementsByTagName("ul");
    //Display the dropdown
    findUl[0].style.display = "block";
		
		//Gets an array of dom objects that have the class dropdown in a div tag
		dropDownArr = document.getElementsByClassName("dropdown");
		
		// If the ddState flag has a value then loop through dropDownArr 
		// until you find the ddState that equals the one in dropDownArr and hide that specific
		if (ddState) {			
			for (j=0;j<=(dropDownArr.length - 1); j++) {
				if (ddState == dropDownArr[j].id && dropDownArr[j].id !== block) {
						var hideUl = document.getElementById(dropDownArr[j].id).getElementsByTagName("ul");
						hideUl[0].style.display = "none";
						ddState = ""
					}
				}
			}		
    
    //Get the nodes' properties
    ddWidth = document.getElementById(block).offsetWidth;
    findUl[0].style.width = ddWidth-buttonWidth+"px";
    ddHeight = findUl[0].offsetHeight;
    ddX = findPosX(obj);
    ddY = findPosY(obj);
    ddMargin = document.getElementById('container').offsetLeft;

		
		
		
    //Calculate the coordinates of the space outside of the dropdown.
    //Used when the cursor is clicked outside of the dropdown to close it.
    
    topPos = document.getElementById(block).offsetTop;
    leftPos = ddX;
    rightPos = leftPos + findUl[0].offsetWidth+buttonWidth;
    topPos = ddY;
    bottomPos = topPos+findUl[0].offsetHeight;
    
    //Flag the DOM that the dropdown is displayed, and the ID to close when the list is clicked outside
    ddState = block;

}




//Close the dropdown after one of its options is clicked
function hideDD(obj) 
{
    var findUl = obj.parentNode.parentNode;
    findUl.style.display = "none";
}



//Close the dropdown on "blur" -- when the cursor clicks outside of the dropdown while its displayed
//Detects the click's position based on values set in the function showDD
function blurDD(obj) 
{
    if (document.getElementById(obj)) 
    {
	    var hideUL = document.getElementById(obj).getElementsByTagName("ul");
		if (cursorX < leftPos || cursorX > rightPos || cursorY < topPos || cursorY > bottomPos) 
		{
            hideUL[0].style.display = "none";
		}
    	var findA = document.getElementById(obj).getElementsByTagName("a");
    	findA.onclick = function() {ddButton(obj);} 

	}

}

/* Swap the dropdown javascript commands when the button is clicked */
function ddButton(obj) 
{
    var findDiv = obj.parentNode;
    var findA = findDiv.getElementsByTagName("a");
    findA[0].onclick = function() {ddButtonClose(obj); return false;} 
}

function ddButtonClose(obj) 
{
    var findDiv = obj.parentNode;
    var findA = findDiv.getElementsByTagName("a");
    var findUl = findDiv.parentNode.getElementsByTagName("ul");
    findUl[0].style.display = "none";
    findA[0].onclick = function() {ddButton(obj); return false;} 
}
/*
Detects NN7 and Safari, and displays HTML dropdowns instead of custom dropdowns.
Addresses a DHTML/Flash bug in those browsers.
The custom dropdowns work in those browsers, but the can't overlay Flash.
Launched with onload event at the bottom of the page (must wait for page to load to count divs).
*/
function swapHtml() 
{
    //Detect for Netscape 7 or Safari
    if ((navigator.userAgent.indexOf("Netscape")>1 && parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("Netscape")+9, navigator.userAgent.indexOf("Netscape")+10)) < 8) || (navigator.userAgent.indexOf("Safari")>1) || (navigator.userAgent.indexOf('Opera') != -1)) 
    {
        var replacementList; // the list of dropdowns in the page

    	//look through the tags and collect all the divs with class=dropdowns in an array
	    var ddArray = document.getElementsByTagName("div");
    
    	for (i=0;i<ddArray.length;i++) 
    	{
		    
				if (ddArray[i].className == "dropdown") 
		    {
					
					// -----  Build the select box with link and text values in the dropdown's <ul>
    			var linkArray = ddArray[i].getElementsByTagName("a");
    			var selectArray = ddArray[i].getElementsByTagName("li");
    
					if (navigator.userAgent.indexOf('Opera') != -1) {
						// ----- If Opera add class="opera"
	    			replacementList = "<select name=\"swap\" onChange=\"swapHtmlNav(this)\" class=\"opera\">";
						
									
						} else if (navigator.userAgent.indexOf("Netscape")>1 && parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("Netscape")+9, navigator.userAgent.indexOf("Netscape")+10)) < 8) {
							// ----- If netscape add class="netscape"
							replacementList = "<select name=\"swap\" onChange=\"swapHtmlNav(this)\" class=\"netscape\">";
						} else {
							replacementList = "<select name=\"swap\" onChange=\"swapHtmlNav(this)\">";
						}
					
		    	for (j=1;j<selectArray.length;j++) 
		    	{
    				replacementList += "<option value=\""+linkArray[j].href+"\">"+linkArray[j].innerHTML+"</option>";			
					}
          
					replacementList += "</select>";

			    //Eliminate dropdown styles
    			ddArray[i].style.background = "transparent";
    			ddArray[i].style.margins = "0";
    			ddArray[i].style.padding = "0";
    
	    		//Replace the custom dropdown ul with the <select>
		    	ddArray[i].innerHTML = replacementList;
			}
		} 
	}
}

//Use <select> box for navigation. 
function swapHtmlNav(menuObj) 
{
	var i = menuObj.selectedIndex;
	
	if(i > 0) 
	{
		window.location = menuObj.options[i].value;
	}
}

function gotocountry2( Obj )
{
  document.location = Obj.options[Obj.selectedIndex].value;
}

function gotopath( URL )
{
  document.location = URL;
}

/**
 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";
}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();return true;
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
var _23=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return _23;};
deconcept.PlayerVersion=function(_27){
this.major=_27[0]!=null?parseInt(_27[0]):0;
this.minor=_27[1]!=null?parseInt(_27[1]):0;
this.rev=_27[2]!=null?parseInt(_27[2]):0;
};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){
return false;
}return true;};
deconcept.util={getRequestParameter:function(_29){
var q=document.location.search||document.location.hash;
if(q){var _2b=q.substring(1).split("&");
for(var i=0;i<_2b.length;i++){
if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
return "";}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
var _2d=document.getElementsByTagName("OBJECT");
for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){
if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};
deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
__flash_savedUnloadHandler=function(){};
if(typeof window.onunload=="function"){
var _30=window.onunload;
window.onunload=function(){
deconcept.SWFObjectUtil.cleanupSWFs();_30();};
}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};
if(typeof window.onbeforeunload=="function"){
var oldBeforeUnload=window.onbeforeunload;
window.onbeforeunload=function(){
deconcept.SWFObjectUtil.prepUnload();
oldBeforeUnload();};
}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
if(Array.prototype.push==null){
Array.prototype.push=function(_31){
this[this.length]=_31;
return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject;
var SWFObject=deconcept.SWFObject;

function noFlash() {
	document.location.href = document.location + "?noFlash=1";
} 


/*********************************************************************************************************
  Start of Balloon Popup Window
 ********************************************************************************************************/
var balloonInitDone = false;
var disappeardelay = 300;      // tooltip disappear delay (in miliseconds)
var verticaloffset = -5;        // vertical offset of tooltip from anchor link, if any
var enablearrowhead = 0;       // 0 or 1, to disable or enable the arrow image
var arrowheadimg = [ "/images/arrowdown.gif", "/images/arrowup.gif" ]; //path to down and up arrow images
var arrowheadheight = 5;      //height of arrow image (amount to reveal)

var ie = document.all;
var ns6 = document.getElementById && !document.all;
verticaloffset = ( enablearrowhead )? verticaloffset + arrowheadheight : verticaloffset;

function getposOffset( what, offsettype )
{
  var totaloffset = ( offsettype == "left" ) ? what.offsetLeft : what.offsetTop;
  var parentEl = what.offsetParent;
  return totaloffset;
}

function showhide( obj, e )
{
  dropmenuobj.style.left = dropmenuobj.style.top = "-500px";
  if ( e.type == "mouseover" ) obj.visibility = "visible";
}

function iecompattest()
{
  return ( document.compatMode && document.compatMode != "BackCompat" ) ? document.documentElement : document.body;
}

function clearbrowseredge( obj, whichedge )
{
  if ( whichedge == "rightedge" )
  {
    edgeoffsetx = 0;
    var windowedge = ie && !window.opera ? 
      iecompattest().scrollLeft + iecompattest().clientWidth - 15 : window.pageXOffset + window.innerWidth - 15;
    dropmenuobj.contentmeasure = dropmenuobj.offsetWidth;
    if ( windowedge - dropmenuobj.x < dropmenuobj.contentmeasure ) edgeoffsetx = dropmenuobj.contentmeasure - obj.offsetWidth;
    return edgeoffsetx;
  }
  else
  {
    edgeoffsety = 0;
    var topedge = ie && !window.opera? iecompattest().scrollTop : window.pageYOffset;
    var windowedge = ie && !window.opera ? 
      iecompattest().scrollTop + iecompattest().clientHeight - 15 : window.pageYOffset + window.innerHeight - 18;
    dropmenuobj.contentmeasure = dropmenuobj.offsetHeight;
    if ( windowedge - dropmenuobj.y < dropmenuobj.contentmeasure )
      edgeoffsety = dropmenuobj.contentmeasure + obj.offsetHeight + ( verticaloffset*2 );
    return edgeoffsety
  }
}

// main ballooon tooltip function
function displayballoontip( obj, e ) 
{ 
  if ( window.event ) 
    event.cancelBubble = true;
  else if ( e.stopPropagation )
    e.stopPropagation();

  // hide previous tooltip?
  if ( typeof dropmenuobj != "undefined" ) dropmenuobj.style.visibility = "hidden";
  clearhidemenu();

  dropmenuobj = document.getElementById( obj.getAttribute( "rel" ) );
  showhide( dropmenuobj.style, e );

  dropmenuobj.x = getposOffset( obj, "left" );
  if ( document.all && dropmenuobj.x == 0 ) dropmenuobj.x = eval( document.all ? event.x : e.x );
  dropmenuobj.x = eval( dropmenuobj.x - obj.offsetWidth );

  dropmenuobj.y = getposOffset( obj, "top" );
  if ( document.all && dropmenuobj.y == 0 ) dropmenuobj.y = eval( document.all ? event.y : e.y );
  dropmenuobj.y = eval( dropmenuobj.y + verticaloffset );

  dropmenuobj.style.left = dropmenuobj.x - clearbrowseredge( obj, "rightedge" ) + "px";
  dropmenuobj.style.top = dropmenuobj.y - clearbrowseredge( obj, "bottomedge" ) + obj.offsetHeight + "px";

  if ( !document.all && obj.getAttribute( "rel" ) == 'Share' )
  { 
    dropmenuobj.style.left = eval( window.innerWidth - dropmenuobj.offsetWidth - 50 ) + "px";
    dropmenuobj.style.top = eval( e.pageY + 5 ) + "px";
  }

  if ( enablearrowhead ) displaytiparrow();
}

//function to display optional arrow image associated with tooltip
function displaytiparrow() 
{ 
  tiparrow = document.getElementById( "arrowhead" );
  tiparrow.src = ( edgeoffsety != 0 ) ? arrowheadimg[0] : arrowheadimg[1];
  var ieshadowwidth = ( dropmenuobj.filters && dropmenuobj.filters[0] ) ? dropmenuobj.filters[0].Strength - 1 : 0;

  //modify "left" value depending on whether there's no room on right edge of browser to display it, respectively
  tiparrow.style.left = ( edgeoffsetx != 0 ) ? 
    parseInt( dropmenuobj.style.left ) + dropmenuobj.offsetWidth - tiparrow.offsetWidth - 10 + "px" : 
    parseInt( dropmenuobj.style.left ) + 5 + "px";

  //modify "top" value depending on whether there's no room on right edge of browser to display it, respectively
  tiparrow.style.top = ( edgeoffsety != 0 ) ? 
    parseInt( dropmenuobj.style.top ) + dropmenuobj.offsetHeight - tiparrow.offsetHeight - ieshadowwidth + arrowheadheight + "px" : 
    parseInt( dropmenuobj.style.top ) - arrowheadheight + "px";

  tiparrow.style.visibility = "visible";
}

function delayhidemenu()
{
  delayhide = setTimeout( "dropmenuobj.style.visibility = 'hidden'; dropmenuobj.style.left = 0; " +
                          "if ( enablearrowhead ) tiparrow.style.visibility = 'hidden'", disappeardelay );
}

function clearhidemenu()
{
  if ( typeof delayhide != "undefined" ) clearTimeout( delayhide );
}

function initalizetooltip()
{
  if ( balloonInitDone ) return;
  var balloonInitDone = true;

  if ( enablearrowhead )
  {
    tiparrow = document.createElement( "img" );
    tiparrow.setAttribute( "src", arrowheadimg[0] );
    tiparrow.setAttribute( "id", "arrowhead" );
    tiparrow.setAttribute( "style", "z-index: 6000; position:absolute; top:-500px; left: 0; visibility: hidden;" );
    document.body.appendChild( tiparrow );
    tiparrow.style.visibility = 'hidden';
    tiparrow.style.position = 'absolute';
  }

  var all_links = document.getElementsByTagName( "a" );
  
  for ( var i = 0; i<all_links.length; i++ )
  {
    // if link has "rel" defined and it's the ID of an element on page
    if ( all_links[i].rel ) 
    { 
      all_links[i].onmouseover = function( e )
                                 {
                                   var evtobj = window.event? window.event : e;
                                   displayballoontip( this, evtobj );
                                 }

      all_links[i].onmouseout = delayhidemenu;

      var iFrame = document.getElementById( all_links[i].rel );
      if ( iFrame )
      {
        iFrame.onmouseover = function( e )
                             {
                               if ( typeof delayhide != "undefined" ) clearTimeout( delayhide );
                             }

        iFrame.onmouseout = delayhidemenu;
      }
    }
  }
}

/***  Start of Marketbright My Profile code ***/

var UserCookie = new Array(30);
var CookieUsername = 1, CookieUser_Id = 2, CookieGroup_Id = 3, CookiePerson_Id = 4, 
    CookieName = 5, CookieEmail = 6, CookiePrefs = 7, CookiePrivs = 8, CookieValid = false;

function getCookie( name )
{
  var arg = name + '=';
  if ( document.cookie && document.cookie.length != 0 )
  {
  	var cstart = document.cookie.indexOf( arg );
    if ( cstart == -1 )
      return null;
    else
    {
      var tmpStr = document.cookie.substring( cstart, ( document.cookie.length + 1 ) );
    	var cend = tmpStr.indexOf( ';' );
      if ( cend == -1 ) cend = tmpStr.length + 1;
	  	tmpStr = unescape( tmpStr.substring( arg.length, cend ) );
      return tmpStr;
    }
  }
  else
    return null;
}

function ReadCookie()
{
	CookieValid = false;
  var j=1, i=0;
  var str = getCookie( 'Marketbright_Cookie' );
  
	if ( str == null || str == "" ) return false;
  
	if ( str.indexOf( "../../index.html" ) != -1 )
  {
		while ( str.substring( i, str.length ).indexOf( "../../index.html" ) != -1 && j < 50 )
    {
      cStr = "";
      for ( var i; str.substring( i, i + 1 ) != "../../index.html"; i++ ) cStr += str.charAt(i);
      i++;
      UserCookie[j] = cStr;
      j++
		}
	}
 	UserCookie[j] = str.substring( i, str.length );
 	UserCookie[0] = j-1;
	CookieValid = true;

  return true;
}

function getWelcome( Text, altText )
{
  if ( !CookieValid ) ReadCookie();

  if ( !Text ) Text = 'Welcome [Name]';
  if ( !altText ) altText = 'My Profile';
  var Str = '';
  var thisCookieName = UserCookie[CookieName];
  
  if ( CookieValid && UserCookie[CookieUser_Id] != '1' )    
  {
    if ( thisCookieName.indexOf( ' ' ) > -1 ) 
      thisCookieName = thisCookieName.substring( 0, thisCookieName.indexOf( ' ' ) );

    Str = Text.replace( '[Name]', thisCookieName );
  }
  else
    Str = altText;

//    Str += '</b>,<br></SPAN> <A class="HelpTextG" href="/services/web/Update_Users.Logout?Action=/index.html" class="HelpText">sign out</A>&nbsp;' +
//           '|&nbsp;<A class="HelpTextG" href="/pages/account/edit.html" class="HelpText">my account</A>&nbsp;';
//    Str += ',</SPAN> <A class="HelpTextG" href="/pages/account/login.html?Action=edit.html" class="HelpText">sign in</A>&nbsp;';
  
  return Str;
}

function getSignOut( Text, Action )
{
  if ( !Text ) Text = 'If you are not [Name] <a target="_top" href="[Logout]">Sign Out</a>.';
  if ( !Action ) Action = 'Refresh';
  
  Text = Text.replace( '[Logout]', '/api/Update_Users.Logout?Action=' + Action );
  Text = Text.replace( '[Name]', UserCookie[CookieName] );
  Text = Text.replace( '[Email]', UserCookie[CookieEmail] );
  return Text;
}

ReadCookie();

/***  End of Marketbright My Profile code ***/

function drawBalloon( Text, URL, Width, Height, rightPadding )
{
  // Make sure the URL starts with but does not include (in a parameter)
  if ( document.location.href.indexOf( '/www-stage.oriaskit.es' ) < 10 && 
       document.location.href.indexOf( '/www.oriaskit.es' ) < 10 ) URL = 'http://www.oriaskit.es' + URL;

  var Name = Text.replace( / /g, '_' );
  if ( !rightPadding ) rightPadding = '0';
  var Str = '<span style="margin-right:'+rightPadding+'px"><a href="#" rel="' + Name + '">' + Text + '</a></span>\n';
  Str += '<div id="' + Name + '" \n';
  Str += '     style="position:absolute; left: 0px; top:-500px; padding: 0px; visibility: hidden; border:1px solid black;\n';
  Str += '     font:normal 12px Verdana; z-index: 10001; background-color: white; width: '+Width+'px; height: '+Height+'px;\n';
                          // Remove below line to remove shadow. Below line should always appear last within this CSS 
  Str += '     filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135,Strength=5)">\n';
  Str += '<iframe src="'+URL+'" name="' + Name + '" id="' + Name + '_iFrame" width="'+Width+'" height="'+Height+'" marginwidth="0" marginheight="0" frameborder="0">\n';
  Str += '</iframe>\n';
  Str += '</div>\n';

  document.write( Str );
}

var welcomeStr = getWelcome( 'Welcome [Name]', 'My Profile' );
var contactStr = 'info@oriaskit.es';
var globalStr = 'Acceda al formulario de contacto';
var Country = 'United';
var supportStr = 'Support';
var salesStr = 'Llámenos al 91 798 49 46';
var emailStr = '';
var pageGeo = 'http://www.oriaskit.es/prueba/contacto.htm';
var geoURL = 'http://www.oriaskit.es/prueba/contacto.htm';
var contactURL = 'http://www.oriaskit.es/prueba/contacto.htm';
var regionTab = '0';

function drawSales( Geo )
{
  var Str = '<h2 style="margin:0; padding:0;font-size:14px;font-weight:bold">' + salesStr + '</h2>\n';
  if ( emailStr )
    Str += '<h2 style="margin:0; padding:0;font-size:12px;font-weight:bold">Email: ' +
           '<a style="color:#AC192B; " href="mailto:' + emailStr + '">' + emailStr + '</a></h2>\n';
  Str += '<div id="Sales" style="padding-left:20px; padding-top:5px;">\n';
  Str += '  <ul style="margin: 0; padding: 0;"><li style="list-style: none url(/images/template/iconContact.gif);margin: 5 0 25 0; color: #999999; padding-bottom:5px; padding-left: 2px;"> ' +
         '<a href="' + geoURL + contactURL + '">'+contactStr+'</a>\n';
  Str += '<li style="list-style: none url(/images/template/iconGlobe.gif);margin: 5 0 5 0; color: #999999; padding-left: 2px;"> ' +
         '<a href="'+geoURL+'#'+regionTab+'">'+globalStr+'</a><br>\n';
  Str += '</ul></div>\n';
  document.write( Str );
}

function drawTopLinks( Geo )
{
  geoURL = Geo;
  Geo = Geo.replace ( 'http://www.oriaskit.es/prueba/contacto.htm', '' );
  pageGeo = Geo;

  if ( Geo == 'au' )
  {
    Country = 'Australia';
    regionTab = 3;
  }
  else if ( Geo == 'at' )
  {
    Country = 'Austria';
    regionTab = 1;
  }
  else if ( Geo == 'be' )
  {
    welcomeStr = getWelcome( 'Welcome [Name]', 'My Profile' );
    Country = 'Belgium';
    salesStr = 'Contact<br>+32.3.206.1711';
    regionTab = 1;
  }
  else if ( Geo == 'ca' )
  {
    Country = 'Canada';
    regionTab = 0;
  }
  else if ( Geo == 'cn' )
  {
    welcomeStr = getWelcome( '&#27426;&#36814; [Name]', 'My profile' );
    Country = 'China';
    supportStr = '&#23458;&#25143;&#25903;&#25345;';
    salesStr = 'Sales +86 21 51160595';
    regionTab = 3;
  }
  else if ( Geo == 'de' )
  {
    welcomeStr = getWelcome( 'Willkommen [Name]', 'Mein Profil' );
    Country = 'Germany';
    if ( document.location.pathname == '/geo/de/index.html' || document.location.pathname == '../../geo/de/index.html' )
      salesStr = 'Kontakt +49 (0) 89 / 96271-0';
    else
      salesStr = 'Kontakt<br>+49 (0) 89 / 96271-0';
    emailStr = 'de.marketing@oriaskit.es';
    regionTab = 0; // This is != 1 because the german section has a tranlsated and differnt contact us
    contactStr = 'info@oriaskit.es';
    globalStr = 'Global contacts';
  }
  else if ( Geo == 'dk' )
  {
    Country = 'Denmark';
    salesStr = 'Contact<br>+46 (0)8 410 60 100';
    emailStr = 'nordicinfo@oriaskit.es';
    regionTab = 1;
  }
  else if ( Geo == 'fi' )
  {
    Country = 'Finland';
    salesStr = 'Contact<br>+46 (0)8 410 60 100';
    emailStr = 'nordicinfo@oriaskit.es';
    regionTab = 1;
  }
  else if ( Geo == 'fr' )
  {
    welcomeStr = getWelcome( 'Bienvenue [Name]', 'Mon profil' );
    Country = 'France';
    salesStr = 'Contact<br>+33 1 70 92 94 94';
    emailStr = 'fmarketing@oriaskit.es';
    regionTab = 0; // This is != 1 because the french section has a tranlsated and differnt contact us
    contactURL = '../../pages/campaigns/2174fr-eval-tt/index.html';
    contactStr = 'Demande d’information';
    globalStr = 'Nous contacter';
  }
  else if ( Geo == 'in' )
  {
    Country = 'India';
    regionTab = 3;
  }
  else if ( Geo == 'it' )
  {
    welcomeStr = getWelcome( 'Benvenuto [Name]', 'Mio profilo' );
    Country = 'Italy';
    salesStr = 'Contattaci<br>+39-02-46712-576';
    emailStr = 'itasales@oriaskit.es';
    regionTab = 1;
    contactStr = 'Fatti contattare da Serena';
    globalStr = 'Serena nel mondo';
  }
  else if ( Geo == 'jp' )
  {
    welcomeStr = getWelcome( '&#27475;&#36814; [Name]', 'My profile' );
    Country = 'Japan';
    salesStr = 'Sales 0120-20-9614';
    emailStr = 'jpsales@oriaskit.es';
    regionTab = 3;
  }
  else if ( Geo == 'kr' )
  {
    welcomeStr = getWelcome( '&#54872;&#50689; [Name]', 'My profile' );
    Country = 'Korea';
    supportStr = '&#51648;&#50896;';
    regionTab = 0; // This is != 1 because the kr  section has a tranlsated and differnt contact us
  }
  else if ( Geo == 'nl' )
  {
    welcomeStr = getWelcome( 'Welcome [Name]', 'My Profile' );
    Country = 'Netherlands';
    salesStr = 'Contact<br>+32.3.206.1711';
    regionTab = 1;
  }
  else if ( Geo == 'no' )
  {
    Country = 'Norway';
    salesStr = 'Contact<br>+46 (0)8 410 60 100';
    emailStr = 'nordicinfo@oriaskit.es';
    regionTab = 1;
  }
  else if ( Geo == 'sk' )
  {
    Country = 'Sweden';
    salesStr = 'Contact<br>+46 (0)8 410 60 100';
    emailStr = 'nordicinfo@oriaskit.es';
    regionTab = 1;
  }
  else if ( Geo == 'pt' )
  {
    welcomeStr = getWelcome( 'Boa vinda [Name]', 'My profile' );
    Country = 'Portugal';
    salesStr = 'Sales +33 1 70 92 94 94';
    regionTab = 1;
  }
  else if ( Geo == 'sp' )
  {
    welcomeStr = getWelcome( 'Bienviendos [Name]', 'Mi perfil' );
    Country = 'Spain';
    salesStr = 'Contacto +33 1 70 92 94 94';
    regionTab = 1;
    contactStr = 'Demanda de información';
    globalStr = 'Entrar en contacto';
  }
  else if ( Geo == 'ch' )
  {
    Country = 'Switzerland';
    regionTab = 1;
  }
  else if ( Geo == 'en' || Geo == 'uk' )
  {
    Country = 'United Kingdom';
    salesStr = 'Sales 0800 328 0243';
    regionTab = 0; // This is != 1 because the uk section has a tranlsated and differnt contact us
  }

  // Text, URL, Width, Height, Right-Padding
  drawBalloon( welcomeStr, '../../includes/html/welcome_popup6205.html?Geo='+geoURL+'&Referrer='+escape(document.location.href), 277, 153, 75 );
  drawBalloon( supportStr, '../../includes/html/support_popup6205.html?Geo='+geoURL, 277, 153, 5 );
  drawBalloon( Country, '../../includes/html/country_popup6205.html?Geo='+geoURL, 330, 171, 5 );
}
            
function setItem( Name, Path )
{
	var Obj;
  if ( Name == 'Menu' )
    var Obj = document.getElementById( 'menu' );
  else
  	var Obj = document.getElementById( 'navHorizontal' );

  var Found = false;
  if ( Obj && Obj.children && Obj.children.length > 0 )
  {
    for ( i=0; i < Obj.children.length; i++ )
    {
      if ( Obj.children[i].tagName == 'LI' )
      {
        if ( typeof( Obj.children[i].innerHTML ) != 'undefined' && Obj.children[i].innerHTML.indexOf( Path ) > -1 ) 
        {
          Obj.children[i].className = "on";
          Found = true;
          if ( Name == 'Menu' && typeof( s ) != 'undefined' && Obj.children[i].children[0] )
            s.channel = Obj.children[i].children[0].innerHTML;
        }
        else
          Obj.children[i].className = "";
      }
    }

    if (!Found )
    {
      Path = Path.substring( Path.lastIndexOf( '../../index.html' ) + 1 );
      for ( i=0; i < Obj.children.length; i++ )
      {
        if ( Obj.children[i].tagName == 'LI' )
        {
          if ( typeof( Obj.children[i].innerHTML ) != 'undefined' && Obj.children[i].innerHTML.indexOf( Path ) > -1 ) 
          {
            Obj.children[i].className = "on";
            Found = true;
            if ( Name == 'Menu' && typeof( s ) != 'undefined' && Obj.children[i].children[0] )
              s.channel = Obj.children[i].children[0].innerHTML;
          }
          else
            Obj.children[i].className = "";
        }
      }
    }
  }
}

function afterLoad()
{
  var URL = document.location.href;

  if ( URL.indexOf( '../../products/index-2.html' ) > -1 ) setItem( 'Menu', '../../products/index-2.html' );
  else if ( URL.indexOf( '../../solutions/index-2.html' ) > -1 ) setItem( 'Menu', '../../solutions/index-2.html' );
  else if ( URL.indexOf( '../index-2.html' ) > -1 ) setItem( 'Menu', '../index-2.html' );
  else if ( URL.indexOf( '../../customers/index-2.html' ) > -1 ) setItem( 'Menu', '../../customers/index-2.html' );
  else if ( URL.indexOf( '../../partners/index-2.html' ) > -1 ) setItem( 'Menu', '../../partners/index-2.html' );
  else if ( URL.indexOf( '../../company/index-2.html' ) > -1 ) setItem( 'Menu', '../../company/index-2.html' );

  URL = URL.replace( 'http://' + document.location.hostname, '' );
  if ( URL.indexOf( '../../geo/index.html' ) > -1 ) URL = URL.substring( 7 );
  setItem( 'LeftNav', URL );
  
  if ( typeof( s ) != 'undefined' )
  {
    var H1s = document.getElementsByTagName( 'h1' );
    if ( H1s && H1s[0] ) s.prop3 = H1s[0].innerHTML;

    var H2s = document.getElementsByTagName( 'h2' );
    if ( H2s && H2s[0] ) s.prop4 = H2s[0].innerHTML;

    if ( s.campaign && ( document.location.href.indexOf( 'index67b3.html?Campaign_Id=' ) > -1 ||
                         document.location.href.indexOf( 'survey67b3.html?Campaign_Id=' ) > -1 ) )
      s.events = 'event1';

    if ( document.location.href.indexOf( 'thank_you.html' ) > -1 )
      s.events = 'event2';
  }
}

//var gAutoPrint = false; // Flag for whether or not to automatically call the print function
var gAutoPrint = true; // Flag for whether or not to automatically call the print function

function printPage()
{
	if (document.getElementById != null)
	{
		var html = '<HTML>\n<HEAD>\n';
		var printReadyElem = document.getElementById( 'body' );
    if ( !printReadyElem )
    {
			var DIVs = document.getElementsByTagName( 'div' );
      for ( i=0; i < DIVs.length; i++ )
      {
        if ( DIVs[i].className == 'bodyLanding' ) printReadyElem = DIVs[i];
      }
    }

		if (document.getElementsByTagName != null)
		{
			var headTags = document.getElementsByTagName( 'head' );
			if (headTags.length > 0) html += headTags[0].innerHTML;

      if ( html.indexOf( 'lib.html' ) == -1 ) 
        html += '<script src="/includes/js/lib.js" type="text/javascript" charset="utf-8"></script>\n';
        html += '<STYLE>body { background: #FFFFFF url(); text-align: left }</STYLE>\n';
		}
		
		html += '\n</HE' + 'AD>\n';
		html += '<body style="margin: 0; padding: 0; color: #4c4c4c; font: 69%/1.3em Arial, Helvetica, Geneva, sans-serif;">\n';

		if ( printReadyElem )
    {
  		html += '	<div style="width: 700px; margin: 0 auto; text-align: left; repeat-y center top;">\n';
  		html += '		<div style="padding-left: 13px; padding-right: 6px;">\n';
      html += '        <table style="padding:6px 24px 36px 10px; width:700px; border-collapse:collapse;"><tr><td>\n';
      html += '          <a href="../../index2.html"><img alt="Serena Logo" hspace=40 vspace=20 src="../../images/global/serena_logo.gif" border=0></a></td><td align="right" valign="middle">\n';
      html += '          <p style="padding-top:20px; float: right; text-align:right; color:#333333">' + 
                                    document.title.substring( 0, document.title.indexOf( '- Serena Software' ) ) + '<br>\n';
      html += '          <a href="%27%20+%20document.location.html">' + document.location.href + '</a></p>\n';
      html += '        </td></tr></table>\n';

      html += '      <table border="0" cellspacing="0" cellpadding="0" style="padding:6px 0px 0px 36px; width:700px;"><tr><td>\n';

  		html += printReadyElem.innerHTML;

      html += '    </td></tr></table>\n';
  		html += '  <br><br>\n';
  		html += '</div>\n';

  		html += '<p style="text-align:right; color: #A6A689;">&copy; 2007 Serena Software, Inc. All rights reserved.</p>\n';
  		html += '</div>\n';
    }
		else
		{
			window.print();
			return;
		}
			
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';
		
		var printWin = window.open("","printPage");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint) printWin.print();
	}
	else
		window.print();
}

function checkPageRedirect()
{
  if ( typeof( noPageRedirect ) != 'undefined' && noPageRedirect == true ) return;
  if ( document.location.protocol == 'http:' && document.location.pathname.indexOf( '/' + 'pages/' ) == -1 )
  {
    var URL = document.location.protocol + '//' + document.location.hostname;
    if ( document.location.port ) URL += ':' + document.location.port;
    URL += '/' + 'pages';
    if ( document.location.pathname.substring( 0, 1 ) != '/' ) URL += '/';
    URL += document.location.pathname;
    if ( document.location.search ) URL += document.location.search;
    if ( document.location.hash ) URL += document.location.hash;
    document.location.replace( URL );
  }
}

function customizeButtons()
{
  var Obj = document.getElementById( 'editDocumentButtonRow' );
  if ( Obj )
  {
    Obj.style.display = 'none';
    Obj.style.visibility = 'hidden';
  }

  var Obj = document.getElementById( 'newButtons' );

  if ( Obj )
  {
    Obj.style.display = 'block';
    Obj.style.visibility = 'visible';
  }

  if ( typeof( document.Doc_Customization ) == 'undefined' && 
       document.location.protocol == 'http:' && 
       document.location.pathname.indexOf( '/' + 'pages/' ) == -1 )
  {
    var URL = document.location.protocol + '//' + document.location.hostname;
    if ( document.location.port ) URL += ':' + document.location.port;
    URL += '/' + 'pages';
    if ( document.location.pathname.substring( 0, 1 ) != '/' ) URL += '/';
    URL += document.location.pathname;
    if ( document.location.search ) URL += document.location.search;
    if ( document.location.hash ) URL += document.location.hash;

    document.location.replace( URL );
  }
}

if ( window.addEventListener )
  window.addEventListener( 'load', initalizetooltip, false );
else if ( window.attachEvent )
  window.attachEvent( 'onload', initalizetooltip );
else if ( document.getElementById )
  window.onload = initalizetooltip;

/*********************************************************************************************************
  End of Balloon Popup Window
 ********************************************************************************************************/

// Function for Support Popup
function showSubMenu(ele_id,className)
{
  var ele = document.getElementById( ele_id );
  ele.className = (ele.className == className) ? '' : className;
  return false;
}

//Pass a full http URL and it will return the domain address
function getDomainName(urlToReturn) {
	var currentFullPath = urlToReturn;
	var domianPath = currentFullPath.slice(7, currentFullPath.length);
	var domainNameToReturn = domianPath.slice(0,domianPath.indexOf("/"));
	return domainNameToReturn;
} 

