﻿function getId(id){
    return document.getElementById(id);
}

function fastDelete(id){
	var Obj = getId(id);
	var parent = Obj.parentNode;
	parent.removeChild(Obj);
}


function log(){
    var resolutie = screen.width + "x" + screen.height;
    var url = "log.aspx";
    var method = "GET";
    var string = "resolutie=" + resolutie;
    new net.ContentLoader(url,callback,method,string);
}

function callback(){
}

function popUp(){
    var body 	= getId('body');
    var height = document.body.clientHeight;
	var div = document.createElement("div");
	div.id = "overlap";
	div.className = "fade";
	div.style.height = height + "px";
	body.appendChild(div);
	
	new net.ContentLoader("test.html",popupCallback,"GET");
}

function popupCallback(){
    var popupContent = this.req.responseText;
	var body 	= getId('body');
	var div = document.createElement("div");
	
	div.id = "overlap2";
	div.className = "fade2";
	div.innerHTML = popupContent;
	body.appendChild(div);
}

function closePopup(){
    fastDelete('overlap2');
	fastDelete('overlap');
	var body 	= getId('body');
	body.style.overflow = "auto";
}
