/* ---------------------------- */
/* XMLHTTPRequest Enable */
/* ---------------------------- */
function createObject() {
var request_type;
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer"){
request_type = new ActiveXObject("Microsoft.XMLHTTP");
}else{
request_type = new XMLHttpRequest();
}
return request_type;
}

var http = createObject();



/* -------------------------- */
/* INSERT */
/* -------------------------- */
/* Required: var nocache is a random number to add to request. This value solve an Internet Explorer cache issue */
var nocache = 0;

function insertLeaderboardStat() {
	var banner_id = document.getElementById('banner_leaderboard').value;
	// Set te random number to add to URL request
	nocache = Math.random();
	// Pass the login variables like URL variable
	http.open('get', 'index.php?insert_click=yes&banner='+banner_id+'&nocache = '+nocache);
	http.send(null);
}

function insertLeftSckyscraperStat() {
	var banner_id = document.getElementById('banner_left_skyscraper').value;
	// Set te random number to add to URL request
	nocache = Math.random();
	// Pass the login variables like URL variable
	http.open('get', 'index.php?insert_click=yes&banner='+banner_id+'&nocache = '+nocache);
	http.send(null);
}

function insertRightSckyscraperStat() {
	var banner_id = document.getElementById('banner_right_skyscraper').value;
	// Set te random number to add to URL request
	nocache = Math.random();
	// Pass the login variables like URL variable
	http.open('get', 'index.php?insert_click=yes&banner='+banner_id+'&nocache = '+nocache);
	http.send(null);
}

function insertFullBannerStat() {
	var banner_id = document.getElementById('banner_full_banner').value;
	// Set te random number to add to URL request
	nocache = Math.random();
	// Pass the login variables like URL variable
	http.open('get', 'index.php?insert_click=yes&banner='+banner_id+'&nocache = '+nocache);
	http.send(null);
}

function insertMonsterboardStat() {
	var banner_id = document.getElementById('banner_monsterboard').value;
	// Set te random number to add to URL request
	nocache = Math.random();
	// Pass the login variables like URL variable
	http.open('get', 'index.php?insert_click=yes&banner='+banner_id+'&nocache = '+nocache);
	http.send(null);
}

function insertSquareStat() {
	var banner_id = document.getElementById('banner_square').value;
	// Set te random number to add to URL request
	nocache = Math.random();
	// Pass the login variables like URL variable
	http.open('get', 'index.php?insert_click=yes&banner='+banner_id+'&nocache = '+nocache);
	http.send(null);
}

function insertMonsterboardArticlesStat() {
	var banner_id = document.getElementById('banner_monsterboard_articles').value;
	// Set te random number to add to URL request
	nocache = Math.random();
	// Pass the login variables like URL variable
	http.open('get', 'index.php?insert_click=yes&banner='+banner_id+'&nocache = '+nocache);
	http.send(null);
}




