var NS4 = (navigator.appName.indexOf("Netscape")>=0 && !document.getElementById)? true : false;
var IE4 = (document.all && !document.getElementById)? true : false;
var IE5 = (document.getElementById && document.all)? true : false;
var NS6 = (document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? true: false;
var W3C = (document.getElementById)? true : false;
var ieop=0;
var infodivheight;
var op_id=0;
var isMouseOndiv=true;

function showInnerContent(divname,name){
	document.getElementById(divname).style.display='block';
	incrOpacity(divname);
}

function hideOuterContent(divName){
	isMouseOndiv=false;
	hideDHTMLContent(divName);
	}

function hideContentWithoutFade(divName){
	isMouseOndiv=false;
	var elementStyleObj=document.getElementById(divName).style;
	elementStyleObj.display='none';

}
function hideDHTMLContent(divname){
	setTimeout('decrOpacity("'+divname+'")', 10);
}
function incrOpacity(divname){
	var elementStyleObj=document.getElementById(divname).style;
	if(ieop<100){
		ieop+=7;
		 setOpacity(elementStyleObj,ieop);

		op_id=setTimeout('incrOpacity("'+divname+'")', 10);
	}
}

function decrOpacity(divname){
	var elementStyleObj=document.getElementById(divname).style;
	if(ieop>1){
		if(!isMouseOndiv){
			ieop-=10;
			 setOpacity(elementStyleObj,ieop);
		}

		op_id=setTimeout('decrOpacity("'+divname+'")', 10);
	}else{
		if(!isMouseOndiv){
			elementStyleObj.display='none';
		}
		isMouseOndiv=true;
	}
}

function mouseOutInnerDiv(){
	isMouseOndiv=false;

}

function mouseOnInnerDiv(divname){
	document.getElementById(divname).style.display='block';
	isMouseOndiv=true;
}


function setOpacity(elementStyleObj,ieop){
	if(IE4 || IE5)elementStyleObj.filter="alpha(opacity="+ieop+")";
	if(NS6)elementStyleObj.MozOpacity=ieop/100;
}
/**********code for what customer says flash*************/
  	var praises = new Array();
  	praises[0] = new Array("You folks delivered amazingly close to Christmas on zero lead time. I'm really curious as to how you made that work. Fruit is exorbitant in Japan. To my surprise, it costed me less than what I would have if I personally did it using USPS Priority mail&#45;&#45;not even express. How did you make it happen&#63; I&#39;ve got a lot of respect for your operation&#33;", "Bryan");
	praises[1] = new Array("Thanks a lot. Definitely looking forward to visiting you again.", "Madhu Sompally");
	praises[2] = new Array("Dear Betty&#44; Thank you very much for being so professional and for your great service. You are by far the best&#33; Regards", "Michelle");
	praises[3] = new Array("Hi Jason&#44; The people who recieved the flowers said they looked great and they got them. Thank you so much for your service. We will use you guys again&#44; we were sooo happy with the outcome&#33; Thanks", "Stephanie");
	var currentPraiseIndex = 0;
	var spanPraise;
	var spanCustomer;
	var fadeTimer;
	var currentColor = 5;
	function initCustomerPraise(){
		spanPraise = document.getElementById("content");
		spanCustomer = document.getElementById("name");
	}
	function rotateCustomerPraise(){
	fadeTimer = setInterval("fadeOutCus()", 50);
	}
	function fadeOutCus(){
	paintPraise();
	if(currentColor == 15){
	clearInterval(fadeTimer);
	if (spanPraise!=null) 	{	spanPraise.innerHTML = praises[currentPraiseIndex][0];}
	if (spanCustomer!=null) 	{spanCustomer.innerHTML = "&#151; " + praises[currentPraiseIndex][1];}

	currentPraiseIndex = (currentPraiseIndex + 1) % praises.length;
	fadeTimer = setInterval("fadeInCus()", 50);
	}
	else{
	currentColor++;
	}
	}
	function fadeInCus(){
	paintPraise();
	if(currentColor == 5){
	clearInterval(fadeTimer);
	}
	else{
	currentColor--;
	}
	}
	function paintPraise(){
	var colorCode = getCurrentColorCode();
	if (spanPraise!=null)	{	spanPraise.style.color = colorCode;}
	if (spanCustomer!=null)	{spanCustomer.style.color = colorCode;}

	}

	function doFade(){
	if(isFading){
	}
	else{
	if(currentColor == 5){
		isFading = true;
		clearInterval(fadeTimer);
	}
	else{
		currentColor--;
	}
	}
	}
	function getCurrentColorCode(){
	var colorCode = "" + currentColor;
	if(currentColor > 9){
	colorCode = String.fromCharCode(87 + currentColor);
	}
	return "#" + colorCode + colorCode + colorCode;
	}
	setInterval("rotateCustomerPraise()", 5000);
/*******code for find a gift fast******/
function showInnerDiv(divname,name){
	document.getElementById(divname).style.display='block';
	document.getElementById(name).style.display='none';
}	
function hideOuterDiv(divName,name){
	isMouseOndiv=false;
	document.getElementById(divName).style.display='none';
	document.getElementById(name).style.display='block';
}	