    function QBox(action, cd, tabchoice) {

	var xScroll, yScroll;
	
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}

	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}
	
	
	var yScroll;

	if (self.pageYOffset) {
		yScroll = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
		yScroll = document.documentElement.scrollTop;
	} else if (document.body) {// all other Explorers
		yScroll = document.body.scrollTop;
	}
	
	

	//var scr_h = screen.availHeight;
	var qbox_cont = document.getElementById("qbox_cont");
	var qbox_struct = document.getElementById("qbox_struct");
    var qbox_struct_Inner = document.getElementById("qbox_struct_Inner");


	qbox_cont.style.display = "block";
	qbox_cont.style.width = "100%";
	qbox_cont.style.height = pageHeight + 'px';
	qbox_cont.style.top = "0px";
	qbox_cont.style.left = "0px";
	
	//popup_form.style.marginTop = pageHeight / 4 + 'px';
	qbox_struct.style.display = "block";
	qbox_struct.style.top = (yScroll + ((windowHeight - 35 - 400) / 2) + 'px');
	qbox_struct.style.left = (((pageWidth - 20 - 450) / 2) + 'px');

	
	switchTab(tabchoice+cd+"_group", tabchoice+cd+"_a", "qboxarea", "qboxtab", "qbox_cd_"+cd);
	switchCD(cd, tabchoice + cd);
	
	selects = document.getElementsByTagName("select");
	for (i = 0; i < selects.length; i++) {
		if(selects[i].className != "FIELD switch")
		    selects[i].style.visibility = "hidden";
	}
	
	
	if(action == 'close') {
		for (i = 0; i < selects.length; i++) {
			selects[i].style.visibility = "visible";
		}
		var divs = document.getElementsByTagName("div");
		for (d = 0; d < divs.length; d++) {
		    if(divs[d].className == "mp3_player") 
		        divs[d].innerHTML = "";
		}
		qbox_cont.style.display = "none";
		qbox_struct.style.display = "none";
		//window.location = window.location.href;
		
	}	
}

