////
//// SETUP
////

// Variable
var conn							= '';

////
//// AJAX INIT
////

function xAjaxInit()
{

// Define connection type
try{ conn = new XMLHttpRequest(); }catch(e){ try{ conn = new ActiveXObject('Msxml2.XMLHTTP'); }catch(e){ try{ conn = new ActiveXObject('Microsoft.XMLHTTP'); }catch(e){ alert('Your browser does not support this feature!'); } } }

}

////
//// AJAX LOAD
////

/*
path								= Script path
*/
function xAjaxLoad(path)
{

// Define connection
xAjaxInit();

// Check connection state
conn.onreadystatechange				= xAjaxOutput;

// Set connection
conn.open('POST', path); conn.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); conn.send('');

}

////
//// AJAX OUTPUT
////

function xAjaxOutput()
{

// When connection success
if((conn.readyState == 4) && (conn.status == 200)){ xData(conn.responseText); Slimbox.scanPage(); }

}

////
//// POPUP
////

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}