function port_bg() {
	document.getElementById('main_container').style.backgroundImage="url(../images/lokor.png)";	
	document.getElementById('main_container').style.backgroundPosition="bottom right";	
	document.getElementById('main_container').style.backgroundRepeat="no-repeat";	
}

function dispQue(e,obj,msg) {
	
	var box=document.getElementById('que_hidden');
	if(msg==1)
		message="Your email will not be shown in the guestbook";
	else if(msg==2)
		message="This is to prevent spam in the guestbook, sorry for the inconvenience this may cause.";
	else 
		message="";
	var cors=findPos(obj);
	switch(e) {
		case 1:
			box.style.visibility="visible";
			box.style.top=(cors[1]-5)+"px";
			box.style.left=(cors[0]+8)+"px";
			box.innerHTML=message;
			break;
		default:
			box.style.visibility="hidden";
	}
}

/*http://www.quirksmode.org/js/findpos.html*/
function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}

function cv_req(cv_topic) {
	{
  var xmlHttp;
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
  catch (e)
    {
    // Internet Explorer
    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;
        }
      }
    }
    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
		//alert
       document.getElementById("cv_right").innerHTML=xmlHttp.responseText;
        }
      }
    xmlHttp.open("GET","scripts/cv_req.php?topic="+cv_topic+"",true);
    xmlHttp.send(null);
  }
	
}
