
/*
	Q&A Content goes below; Note that it must all be on ONE LINE
*/
var q_and_a_content = '';
q_and_a_content += '<p><b>Q. What are the greatest physical obstacles to building the actual network in severely underdeveloped regions?</b>';
q_and_a_content += '&nbsp;The typical physical restrictions that deploying networks in less developed regions involves are: ';
q_and_a_content += '<a href="qa.html" class="bluelink">View Entire Answer</a>';


/*
	Content for News & Events goes here; things to remember: 
		- make sure to put each entry in single quotes
		- if you use a single quote in the string, precede it with a backslash (\)
*/
var ticker_content = new Array();
ticker_content[ticker_content.length] = '<a href="http://www.motorola.com/mediacenter/news/detail/0,,6367_6316_23,00.html" class="bluelink">Motorola Speeds Commercialization of AdvancedTCA and MicroTCA Communications Servers by Launching a Suite of Professional Services&nbsp;&nbsp;Learn More &gt;&gt;</a>';
ticker_content[ticker_content.length] = '<a href="http://www.motorola.com/mediacenter/news/detail/0,,6370_6319_23,00.html" class="bluelink">Motorola Launches Communications Server Alliance<br />Learn More &gt;&gt;</a>';
ticker_content[ticker_content.length] = '<a href="http://www.motorola.com/mediacenter/news/detail/0,,6374_6323_23,00.html" class="bluelink">Motorola Teams with Interphase to Accelerate Deployment of AdvancedTCA and MicroTCA Communications Servers&nbsp;&nbsp;Learn More &gt;&gt;</a>';
ticker_content[ticker_content.length] = '<a href="http://www.motorola.com/mediacenter/news/detail/0,,6376_6330_23,00.html" class="bluelink">Motorola to Demonstrate the Power of Communications Servers at 3GSM World Congress&nbsp;&nbsp;Learn More &gt;&gt;</a>';
/*
	Be sure that the height setting below is big enough to handle the content, otherwise the 
	 page will change height in some browsers.
	 
	Also be sure NOT to change the width setting.
*/
ticker_css_classname = "copy666666";
ticker_css_style     = "width: 285px; height: 50px;";



var pause_length     = 2000;
var total_fade_steps = 20;
var fade_step_length = 40;
var ticker_text_color = new Array(102,102,102);
var ticker_link_color = new Array(0,51,102);
var ticker_bg_color   = new Array(255,255,255);





// for code branching
var is_old_ie  = document.all && !document.getElementById;
var is_dom     = document.getElementById;
var current_string = 0;

function do_fade(){
  if (current_string >= ticker_content.length)
    current_string = 0;
  if (is_dom){
    document.getElementById("ticker").style.color = "rgb(" + ticker_bg_color[0] + ", " + ticker_bg_color[1] + ", " + ticker_bg_color[2] + ")";
    document.getElementById("ticker").innerHTML   = ticker_content[current_string];

    fade_link(1);
    fade_text(1);
  }
  else if (is_old_ie)
    document.all.ticker.innerHTML = ticker_content[current_string];
  current_string++
}

function get_color(step, type) {
  var rgb_trans;
  var fade_color = new Array(3);

/*
  if (step == total_fade_steps) {
	  if (type == "link") {
		  return ("rgb(" + ticker_link_color[0] + ", " + ticker_link_color[1] + ", " + ticker_link_color[2] + ")");
	  } else {
		  return ("rgb(" + ticker_text_color[0] + ", " + ticker_text_color[1] + ", " + ticker_text_color[2] + ")");
	  }
  }
*/  
  for(var i=0; i<3; i++) {
	if (type == "link") {
	  rgb_trans = (ticker_bg_color[i] - ticker_link_color[i]);
	} else {
	  rgb_trans = (ticker_bg_color[i] - ticker_text_color[i]);
	}  
    
    if(rgb_trans > 0) {
      fade_color[i] = ticker_bg_color[i] - (Math.round((rgb_trans/total_fade_steps))*step);
    } else {
      fade_color[i] = ticker_bg_color[i] + (Math.round((Math.abs(rgb_trans)/total_fade_steps))*step);
    }
  }
  return ("rgb(" + fade_color[0] + ", " + fade_color[1] + ", " + fade_color[2] + ")");
}

var timeout;

function fade_text(step) {
  if(step <= total_fade_steps) {	
    document.getElementById("ticker").style.color = get_color(step, "text");
    fade_link(step);
    step++;
    timeout = setTimeout("fade_text(" + step + ")", fade_step_length);
  } else {
    clearTimeout(timeout);
    document.getElementById("ticker").style.color = "rgb(" + ticker_text_color[0] + ", " + ticker_text_color[1] + ", " + ticker_text_color[2] + ")";
    setTimeout("do_fade()", pause_length);
	
  }   
}

function fade_link(step){
  var obj = document.getElementById("ticker").getElementsByTagName("A");
  if (obj.length > 0){
    for (i = 0; i < obj.length; i++)
      obj[i].style.color = get_color(step, "link");
  }
}

function show_ticker() {
	if (is_old_ie || is_dom)
		document.write('<div id="ticker" class="'+ticker_css_classname+'" style="'+ticker_css_style+'"></div>');
	
	if (window.addEventListener) {
		window.addEventListener("load", do_fade, false);
	} else if (window.attachEvent) {
		window.attachEvent("onload", do_fade);
	} else if (document.getElementById) {
		window.onload = do_fade;
	}
}