// JavaScript Document
////////////////////////////////
var locationString = String(this.location);
var lastIndex = locationString.lastIndexOf("/");
var realPath = locationString.slice(0,lastIndex);
//var basePath = realPath;
var basePath = "http://164.109.20.126";


function html_entity_decode(str) {
  var ta=document.createElement("textarea");
  ta.innerHTML=str.replace(/</g,"&lt;").replace(/>/g,"&gt;");
  return ta.value;
}


function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
}

function A(){
	var f = thisMovie('flashnav');
	f.B();
}



function hideshow(targ)
{
document.getElementById(targ).style.display=(document.getElementById(targ).style.display=='')?'none':''; 	
}

function show(targ)
{
document.getElementById(targ).style.display=''; 	
}

function hide(targ)
{
document.getElementById(targ).style.display='none'; 	
}

function bubblein(words)
{


A();
//var fl = document.getElementById('flashnav');
//fl.setVariable("talknow" , true);
var bub = document.getElementById('speechbubble');
bub.style.top = "40px";
bub.style.left = (((document.body.clientWidth-1000)/2)+160)+"px";
//opacity('speechbubble' , 0 , 100 , 1);
show('speechbubble');

var obj = document.getElementById('div_speech');
obj.innerHTML =unescape(words);

}

function bubbleout()
{
//opacity('speechbubble' , 100 , 0 , 100);
hide('speechbubble');
}

function submitform()
{
document.myform.submit();
}




 

function reportError(request) {
	$F('searchResults') = "Error";
}



function opacity(id, opacStart, opacEnd, millisec) {
    //speed for each frame
    var speed = Math.round(millisec / 100);
    var timer = 0;

    //determine the direction for the blending, if start and end are the same nothing happens
    if(opacStart > opacEnd) {
        for(i = opacStart; i >= opacEnd; i--) {
            fade_timeout = setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    } else if(opacStart < opacEnd) {
        for(i = opacStart; i <= opacEnd; i++)
            {
            fade_timeout = setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    }
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
} 

