var URLSite = window.location.href;
var TituloSite = document.title;
function addfav(){
//if (document.all) window.external.AddFavorite(URLSite,TituloSite);
	if (window.sidebar)
        {
          window.sidebar.addPanel(TituloSite, URLSite,"");
        }
    else if( window.external ) { window.external.AddFavorite( URLSite, TituloSite); }
    else if(window.opera && window.print) { return true; }
    else { alert('Não foi possível adicionar esta página aos favoritos automaticamente.\n'+'Por favor, pressione CTRL + D para adicionar manualmente.'); }
}

function findPosY(obj)
{
	if(obj)
		{
			var curtop = 0;
			if (obj.offsetParent)
			{
				while (obj.offsetParent)
				{
					curtop += obj.offsetTop
					obj = obj.offsetParent;
				}
			}
			else if (obj.y)
				curtop += obj.y;
			return curtop;
		}
}
function findPosX(obj)
{
	if(obj)
		{
			var curleft = 0;
			if (obj.offsetParent)
			{
				while (obj.offsetParent)
				{
					curleft += obj.offsetLeft
					obj = obj.offsetParent;
				}
			}
			else if (obj.x)
				curleft += obj.x;
			return curleft;
		}
}


function getHTTPObject() {
    var xmlhttp;
    /*@cc_on
    @if (@_jscript_version >= 5)
    try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
    try {
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (e) {
    xmlhttp = false;
    }
    }
    @else
    xmlhttp = false;
    @end @*/
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
    xmlhttp = new XMLHttpRequest();
    } catch (e) {
    xmlhttp = false;
    }
    }
    return xmlhttp;
}
var http = getHTTPObject();

function verfoto(url) {
  //document.getElementById("intro").style.display="none";
  //
 
  //http.open("GET","thumb.php?"+url, true);
  http.open("GET",url, true);
   http.onreadystatechange = function(){
     
    document.getElementById("big").style.display="block";
	if (http.readyState==4){
      //alert(http.responseText);
	  document.getElementById('big').innerHTML = http.responseText;
	}
	else{
	  document.getElementById('big').innerHTML = "<table cellpadding='0' cellspacing='0' bgcolor='#FFFFFF' width='450' height='400' style='border:1px #b8b8b8 solid;'><tr><td class='carregar' valign='middle' align='center'>a carregar...</td></tr></table>";
	}
  }
  http.send(null);

}

function unthumb(id)
    {
        document.getElementById("big").style.display="none";
    }
