//Close whitebox Function
function WbClose()
{
	document.getElementById('wrapper').style.display = 'none';
	document.getElementById('wbox').style.display = 'none';
}

//whitebox Function
function whitebox(lang,cont)
{

//Variable Data
var page, viewportHeight, extraHeight, topPosition, full, scroll;


//Object Data
var wbox					= document.getElementById('wbox');
var wboxWrapper				= document.getElementById('wrapper');


//Define Viewport Height
scroll 						= document.getElementById('main').scrollHeight;


//Set wbox Height
wbox.style.height 			= scroll + 'px';
wbox.style.display 			= 'block';

//Clear content to prevent flickering
wboxWrapper.innerHTML 		= '';
wboxWrapper.style.display 	= 'block';


if(cont == 'fri')
{
	fnLoad('/util/popup.php?l=' + lang,'wrapper');
}
else if(cont == 'fav')
{
	fnLoad('/util/addFavorite.php?l=' + lang,'wrapper');
}
else if(cont == 'print')
{
	fnLoad('/util/print.php?l=' + lang,'wrapper');
}


}

// // // // //


// // // // //
// // // // //
// // // // //

//Variable Data
var reqt = false;

// // // // //

//fnLoad Function
function fnLoadWb(link){

//Check Supported Browser
try { reqt = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP'); }

//When Not Supported
catch(e){ alert('Unfortunatelly you browser doesn\'t support this feature!'); }

//Check Loaded Status
reqt.onreadystatechange = fnCheckWb;

//Open Link
reqt.open('POST',link);

//Send
reqt.send('');
} 

// // // // //

//fnCheck Function
function fnCheckWb(){

//When Loaded
if((reqt.readyState == 4) && (reqt.status == 200)){

//Output
document.getElementById('wrapper').innerHTML = reqt.responseText;

//???
document.getElementById('wbox').style.display = 'block';
//document.getElementById('wbox-content').style.marginLeft = -((document.getElementById('wbox-photo').width + 20 ) / 2) + 'px';

}

}