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

// Variable
var conn								= '';
var more								= document.getElementById('more') ? document.getElementById('more') : '';
var panel								= document.getElementById('panel') ? document.getElementById('panel') : '';
var backtotop							= document.getElementById('backtotop') ? document.getElementById('backtotop') : '';

// Set action
if(more){ more.onmouseover = xPanelShow; more.onmouseout = xPanelHide; }
if(panel){ panel.onmouseover = xPanelShow; panel.onmouseout = xPanelHide; }
if(backtotop){ xTop(); }

////
//// PANEL SHOW
////

function xPanelShow(){ panel.style.display = 'block'; }

////
//// PANEL HIDE
////

function xPanelHide(){ panel.style.display = 'none'; }

////
//// TOP
////

function xTop()
{

// Variable
var pageHeight, viewportHeight, extraHeight;

// Define page height
if(document.body.scrollHeight){ pageHeight = document.body.scrollHeight; }

// Define viewport height
if(document.documentElement.clientHeight){ viewportHeight = document.documentElement.clientHeight; }else{ viewportHeight = document.body.clientHeight; }

// Define extra height
if(window.scrollMaxY){ extraHeight = window.scrollMaxY; }else{ extraHeight = pageHeight - viewportHeight; }

if(extraHeight > 0){ backtotop.style.display = 'block'; }

}

////
//// 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
////

/*
holder									= Holder reference
path									= Script path
*/
function xAjaxLoad(holder, path)
{

// Define connection
xAjaxInit();

// Check connection state
conn.onreadystatechange					= function(){ if((conn.readyState == 4) && (conn.status == 200)){ xData(holder, conn.responseText); } }

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

}

////
//// AJAX CONVERT LOAD
////

/*
holder									= Holder reference
path									= Script path
*/
function xAjaxConvertLoad(holder, path)
{

// Define connection
xAjaxInit();

// Check connection state
conn.onreadystatechange					= function(){ if((conn.readyState == 4) && (conn.status == 200)){ xConvertData(holder, conn.responseText); } }

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

}

////
//// AJAX EXTRA LOAD
////

/*
holder									= Holder reference
path									= Script path
*/
function xAjaxExtraLoad(holder, path)
{

// Define connection
xAjaxInit();

// Check connection state
conn.onreadystatechange					= function(){ if((conn.readyState == 4) && (conn.status == 200)){ xExtraData(holder, conn.responseText); } }

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

}