var xmlHttp;
var root = 'http://'+location.hostname+'/';

function ajax_http()
{
	try
    {
    xmlHttp=new XMLHttpRequest();
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      try
        {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
      catch (e)
        {
        alert("Your browser does not support AJAX!");
        return false;
        }
      }
    }
	return xmlHttp;
}

function clean_str(str)
{
	str=str.replace(/&/gi,"");
	str=str.replace(/</gi,"");
	str=str.replace(/>/gi,"");
	
	return str;
}

function show_additional_options(id)
{
	xmlHttp_1=ajax_http();
	
	var url= root + "includes/ajax/ShowAdditionalOptions.inc.php";
	var parameters="id="+ encodeURI(id);
	
	xmlHttp_1.onreadystatechange=function()
	{
		document.getElementById('additional_options').innerHTML=xmlHttp_1.responseText;
	}
	 xmlHttp_1.open('POST', url, true);
	 xmlHttp_1.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
     xmlHttp_1.setRequestHeader("Content-length", parameters.length);
     xmlHttp_1.setRequestHeader("Connection", "close");
     xmlHttp_1.send(parameters);
}

function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}

var tmp_s = 0.5;
function adjustFontSize(type)
{
	if(type == 1)
	{
		tmp_s+=0.05;
	}
	else
	{
		tmp_s-=0.05;
	}
	document.getElementById("description_1").style.fontSizeAdjust=tmp_s;
}
