function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
	
}

function toggleColor(id)
{
	
	var lcolor = document.all[id].style.color;
	//alert(lcolor.toUpperCase());
	if( lcolor.toUpperCase() == 'WHITE')
	{
		document.all[id].style.color = 'yellow';
	}
	else
	{
		document.all[id].style.color = 'white';
	}
}

function loadurl(url)
{
	window.location=url;	
}

function writeflashtag()
{
   //document.write('<object classid="clsid:D27CDB6E..." ... height="200">\n');
//   document.write('<param name="movie" value="foo.swf" />\n');
  // document.write('<param name="quality" value="high" />\n');
//   document.write('<embed src="foo.swf" ... height="200"></embed>\n');
//   document.write('</object>\n');
	var abc = readCookie("sitevisited");
	var filename = "flash/head2.swf";
	if(!abc)
	{
		createCookie("sitevisited","1",0);
		filename = "flash/head.swf";
	}
	
   if(navigator.appName == 'Microsoft Internet Explorer')
   {
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="490" height="306">\n');
    document.write('<param name="movie" value="'+filename+'">\n');
    document.write('<param name="quality" value="high">\n');
    document.write('<param name="menu" value="false">\n');
	document.write('<param name="wmode" value="transparent">\n');
	document.write('</object>\n');
   }
   else
   {
	   document.write('<object data="'+filename+'" width="490" height="306" type="application/x-shockwave-flash">\n');
       document.write('<param name="quality" value="high">\n');
       document.write('<param name="menu" value="false">\n');
	 document.write('<param name="wmode" value="transparent">\n');
     document.write('<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer">\n');
     document.write('FAIL (the browser should render some flash content, not this).\n');
    document.write('</object>\n');

   }
    <!--[if !IE]> <-->
    /* <object data="flash/head.swf"
            width="490" height="306" type="application/x-shockwave-flash">
     <param name="quality" value="high">
     <param name="menu" value="false">
	 <param name="wmode" value="transparent">
     <param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer">
     FAIL (the browser should render some flash content, not this).
    </object>
    <!--> <![endif]--> */


}
var qidx =0;
function rotateQuotes()
{
	var Q = new Array();
	Q[0] = '<img alt="" src="images/txt1.jpg"><br>'+
			  '<div style="text-transform:uppercase;text-align:center;font-weight:bold">improved Performance <br>by 140%</div>'+
			  '<img alt="" src="images/spacer.gif" width="1" height="10"><br>' +
			  '<img alt="" src="images/line.jpg"><br>'+
			  '<img alt="" src="images/spacer.gif" width="1" height="14"><br>'+
			  '&ldquo; Awesome statistics.  I have forwarded up to VP level.  Keep up the good work !!! &rdquo;<br><br>'+
			  '- <small>EAI Production Support Manager</small> <br>'+
			  ' <img alt="" src="images/spacer.gif" width="1" height="8"><br>'+
			  '<img alt="" src="images/line.jpg"><br>'+
			  '<img alt="" src="images/spacer.gif" width="1" height="1"><br>'+
			  '<div align="right" style="margin-right:8px "><br>'+
			  '<div class="brown a">Telecom Provider</div></div>'+
			  '</div>';
	Q[1] = '<img alt="" src="images/txt3.jpg"><br>'+
				'<div style="text-transform:uppercase;text-align:center;font-weight:bold">Architecture recommendation resulted in 146% increase in througput...</div>'+
				'<img alt="" src="images/spacer.gif" width="1" height="5"><br>'+
				'<img alt="" src="images/line.jpg"><br>'+
				'<img alt="" src="images/spacer.gif" width="1" height="5"><br>'+
				'&ldquo; This is very detailed analysis and a great '+
				'recommendation.&rdquo; <br><br>'+
				'- <small>EAI Architecture Manager </small> <br>'+
				'<img alt="" src="images/spacer.gif" width="1" height="7"><br>'+
				'<img alt="" src="images/line.jpg"><br>'+
				'<img alt="" src="images/spacer.gif" width="1" height="1"><br>'+
				'<div align="right" style="margin-right:8px "><br>'+
				'<a href="#" class="brown a">Telecom Provider</a></div>'+
				'</div>';

	//alert(document.all['quotediv'].innerHTML);

	//alert(Q1);
	document.all['quotediv'].innerHTML = Q[qidx];
	qidx++;
	if(qidx == Q.length)
		qidx=0;
	self.setTimeout("rotateQuotes()",8000);

}
