// EXPANDER FUNCTION
function expandRow1(){
	teDisplay('caseA01');
	teDisplay('caseA02');
	teDisplay('caseA03');
}
function expandRow2(){
	teDisplay('caseA04');
	teDisplay('caseA05');
	teDisplay('caseA06');
}
function expandRow3(){
	teDisplay('caseA07');
	teDisplay('caseA08');
	teDisplay('caseA09');
}
function expandRow4(){
	teDisplay('caseA10');
	teDisplay('caseA11');
}
function expandRow5(){
	teDisplay('caseA12');
	teDisplay('caseA13');
	teDisplay('caseA14');
}
function expandAll(){
	teDisplay('caseA01');
	teDisplay('caseA02');
	teDisplay('caseA03');
	teDisplay('caseA04');
	teDisplay('caseA05');
	teDisplay('caseA06');
	teDisplay('caseA07');
	teDisplay('caseA08');
	teDisplay('caseA09');
	teDisplay('caseA10');
	teDisplay('caseA11');
	teDisplay('caseA12');
	teDisplay('caseA13');
	teDisplay('caseA14');
}
function showCntBtn(){
	get('cntbtn').style.display = 'block';
}
function hideCntBtn(){
	get('cntbtn').style.display = 'none';
}
function showExpBtn(){
	get('expbtn').style.display = 'block';
}
function hideExpBtn(){
	get('expbtn').style.display = 'none';
}
// END EXPANDER FUNCTION


function flashHolder()
{
    document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=340 HEIGHT=307>\n');
    document.write('<PARAM NAME=movie VALUE="flash/main.swf" />\n');
    document.write('<PARAM NAME=quality VALUE=high />\n');
    document.write('<PARAM NAME=wmode VALUE=transparent />\n');
    document.write('<PARAM NAME=bgcolor VALUE=#FFFFFF />\n');
    document.write('<EMBED src="flash/main.swf" quality=high bgcolor=#FFFFFF WIDTH=340 HEIGHT=307 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" wmode="transparent"></EMBED>\n');
    document.write('</OBJECT>\n');
}


function svcsFlash()
{
    document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=783 HEIGHT=480>\n');
    document.write('<PARAM NAME=movie VALUE="flash/services_anim.swf" />\n');
    document.write('<PARAM NAME=quality VALUE=high />\n');
    document.write('<PARAM NAME=wmode VALUE=transparent />\n');
    document.write('<EMBED src="flash/services_anim.swf" quality=high WIDTH=783 HEIGHT=480 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" wmode="transparent"></EMBED>\n');
    document.write('</OBJECT>\n');
}


function saFlash()
{
    document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=506 HEIGHT=381>\n');
    document.write('<PARAM NAME=movie VALUE="/flash/sa_anim.swf" />\n');
    document.write('<PARAM NAME=quality VALUE=high />\n');
    document.write('<PARAM NAME=wmode VALUE=transparent />\n');
    document.write('<EMBED src="/flash/sa_anim.swf" quality=high WIDTH=506 HEIGHT=381 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" wmode="transparent"></EMBED>\n');
    document.write('</OBJECT>\n');
}


function get(str){
	return document.getElementById(str);
}
function getInclude(id, url) {
  var req = false;
  if (window.XMLHttpRequest) {
    try {
      req = new XMLHttpRequest();
    } catch (e) {
      req = false;
    }
  } else if (window.ActiveXObject) {
    try {
      req = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        req = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        req = false;
      }
    }
  }
 var element = document.getElementById(id);
 if (!element) {
  alert("Bad id " + id + "passed to clientSideInclude.");
  return;
 }
  if (req) {
    req.open('GET', url, false);
    req.send(null);
    element.innerHTML = req.responseText;
  } else {
    element.innerHTML = "Sorry, your browser does not support includes.";
  }
}
function findDiv(){
var e = document.getElementsByTagName("div");
for (var i=0; i < e.length; i++){
	if (e[i].style.display != "none"){
		//alert(e[3].id + " is visible");
	}
}
}
function shrinkcellHeight(){
	get('theCell').style.height = get('morphSPS5').style.height;
	get('theTable').style.display = 'none';
}
function risecellHeight() {
     if (navigator.userAgent.indexOf("Safari")!=-1){
	get('theCell').style.height = '2800px';
     } 
     if (navigator.userAgent.indexOf("Firefox")!=-1){
	get('theCell').style.height = '2200px';
     } else {
	get('theCell').style.height = '2675px';
     }
	get('theTable').style.display = 'block';
}
function closeBox(){
	if (navigator.userAgent.indexOf("Safari")!=-1){
		get('flsh').style.display = 'block';
		get('boxHolder').style.width = '0px';
		get('boxHolder').style.height = '0px';
		get('boxHolder').style.top = '0px';
		get('boxHolder').style.left = '-30px';
		get('box1').style.opacity = '0';
		get('opnr').style.opacity = '0';
	}
	if (navigator.userAgent.indexOf("Firefox")!=-1){
		//alert("FF");
		get('boxHolder').style.width = '0px';
		get('box1').style.opacity = '0';
		get('box1').style.width = '0px';
		get('box1').style.height = '0px';
	}
	if (navigator.userAgent.indexOf("IE")!=-1) {
		//alert("IE");
		get('boxHolder').style.display = 'none';
		get('boxHolder').style.height = '0px';
		get('box1').style.opacity = '0';
		get('box1').style.width = '0px';
		get('box1').style.height = '0px';
	}
	get('theCell').style.height = '510px';
	get('flsh').style.display = 'block';
}
function closeCRBox(){
	if (navigator.userAgent.indexOf("IE")!=-1) {
		//alert("IE");
		get('boxHolder').style.display = 'none';
		get('boxHolder').style.height = '0px';
		get('box1').style.opacity = '0';
		get('box1').style.width = '0px';
		get('box1').style.height = '0px';
		risecellHeight();
	}
	if (navigator.userAgent.indexOf("Firefox")!=-1){
		//alert("FF");
		get('box1').style.opacity = '0';
		get('box1').style.width = '0px';
		get('box1').style.height = '0px';
	}
		risecellHeight();
	if (navigator.userAgent.indexOf("Safari")!=-1){
		//alert("SAFARI");
		get('boxHolder').style.width = '0px';
		get('boxHolder').style.height = '0px';
		get('box1').style.width = '0px';
		get('box1').style.height = '870px';
		risecellHeight();
	}
}
function startClick(){
	get('start').fireEvent('click');
   if(get('flsh') != null){
	get('flsh').style.display = 'none';
   } else {}
	get('boxHolder').style.opacity = '1';
	if (navigator.userAgent.indexOf("Safari")!=-1){
		get('theCell').style.height = get('box1').style.height;
		get('boxHolder').style.width = '770px';
		get('boxHolder').style.height = get('morphSPS5').style.height;
		get('box1').style.opacity = '1';
		get('box1').style.position = 'relative';
		get('box1').style.width = '765px';
		get('opnr').style.opacity = '1';
	}
	if (navigator.userAgent.indexOf("IE")!=-1) {
		get('boxHolder').style.display = 'block';
		get('boxHolder').style.width = '775px';
	}
}
function startCRClick(){
	get('start').fireEvent('click');
   if(get('flsh') != null){
	get('flsh').style.display = 'none';
   } else {}
	get('boxHolder').style.opacity = '1';
	if (navigator.userAgent.indexOf("Safari")!=-1){
		get('theCell').style.height = get('box1').style.height;
		get('boxHolder').style.width = '770px';
		get('boxHolder').style.height = get('morphSPS5').style.height;
		get('boxHolder').style.top = '0px';
		get('boxHolder').style.left = '-30px';
		get('box1').style.opacity = '1';
		get('box1').style.width = '765px';
		get('opnr').style.opacity = '1';
	}
	if (navigator.userAgent.indexOf("IE")!=-1) {
		get('boxHolder').style.display = 'block';
		get('boxHolder').style.width = '775px';
	}
}

// ************ SERVICES FLASH ADDITIONAL LINKS ************
function services1(){
	startClick();
	get('morphSS1').fireEvent('click');
	getInclude('opnr', '/services/comp_sourcing.php');
}
function services2(){
	startClick();
	get('morphSA1').fireEvent('click');
	getInclude('opnr', '/services/spend_analysis.php');
}
function services3(){
	startClick();
	get('morphSM1').fireEvent('click');
	getInclude('opnr', '/services/cat_mgt_svc.php');
}
function services4(){
	startClick();
	get('morphPPE1').fireEvent('click');
	getInclude('opnr', '/services/proc_to_pay.php');
}
function services5(){
	startClick();
	get('morphSPS1').fireEvent('click');
	getInclude('opnr', '/services/make_buy.php');
}
function services6(){
	startClick();
	get('morphSS3').fireEvent('click');
	getInclude('opnr', '/services/low_cost_cs.php');
}

// Spend Analysis Animation
function loadSA_saAnim1(){
	getInclude('saAnims', '/services/spend_analysis_ani1.php');
}
