    function QBox(action, src, bg_src) {

	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");
    var qbox_mov = document.getElementById("qbox_mov");
    var qbox_img = document.getElementById("qbox_img");

	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');
	
	
	qbox_mov.innerHTML = '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="601" height="15" ><param name="src" value="'+src+'" /><param name="autoplay" value="true" /><param name="controller" value="true" /><embed src="'+src+'" width="601" height="15" autoplay="true" type="video/quicktime" controller="true" pluginspage="http://www.apple.com/quicktime/download/"></object>';
	
	
	qbox_img.src = bg_src;
	
	
	selects = document.getElementsByTagName("select");
	for (i = 0; i < selects.length; i++) {
		selects[i].style.visibility = "hidden";
	}
	
	
	if(action == 'close') {
		for (i = 0; i < selects.length; i++) {
			selects[i].style.visibility = "visible";
		}
		qbox_cont.style.display = "none";
		qbox_struct.style.display = "none";
		window.location="?";
	}	
}


 function QBox_Music(action, src, mov_width, mov_height) {
	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");
    var qbox_mov = document.getElementById("qbox_mov");
    var qbox_img = document.getElementById("qbox_img");
    
    //fading
	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";
	
	
	mov_width = Number(mov_width);
	mov_height = (Number(mov_height) + 16);
	
	//qbox_cont.style.display = "block";
	qbox_struct.style.width = mov_width + 'px';
	qbox_struct.style.height = mov_height + 'px';
	
	//popup_form.style.marginTop = pageHeight / 4 + 'px';
	qbox_struct.style.display = "block";
	qbox_struct.style.top = (yScroll + ((windowHeight - 35 - mov_height) / 2) + 'px');
	qbox_struct.style.left = (((pageWidth - 20 - mov_width) / 2) + 'px');
	qbox_struct_Inner.innerHTML = '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="'+mov_width+'" height="'+mov_height+'"><param name="src" value="'+src+'" /><param name="autoplay" value="true" /><param name="controller" value="true" /><embed src="'+src+'" width="'+mov_width+'" height="'+mov_height+'" autoplay="true" type="video/quicktime" controller="true" pluginspage="http://www.apple.com/quicktime/download/"></object>';
	
	
	document.getElementById("close_btn").onclick = function() { QBox_Music('close', '', '', ''); }
	
	selects = document.getElementsByTagName("select");
	for (i = 0; i < selects.length; i++) {
		selects[i].style.visibility = "hidden";
	}
	
	
	if(action == 'close') {
		for (i = 0; i < selects.length; i++) {
			selects[i].style.visibility = "visible";
		}
		qbox_cont.style.display = "none";
		qbox_struct.style.display = "none";
//		if(id) 
//		    window.location="?mid="+id;
//		else
		    window.location="?";
	}	
	
		
	
}