﻿

function showQW(qwdrag,divVeil) {
	var qwdrag = document.getElementById(qwdrag);
	//var qwcustom = document.getElementById("qwcustom");
	//var txt = document.getElementById(ctrlName).innerHTML;
	
	//qwcustom.innerHTML = txt;
	
	var tempX, tempY; 
	if (document.all?true:false) {
	    tempX=(screen.width-480)/2; 
	    tempY=75; 
	} else {
	    tempX=(screen.width-480)/2; 
	    tempY=75; 
	}
	qwdrag.style.left=tempX + 'px';
	qwdrag.style.top=tempY+ getScrollY() + 'px';
	qwdrag.style.display="block";

    var ie=document.all && !window.opera;
    var veil = document.getElementById(divVeil);
	var docwidth=(ie)? document.body.clientWidth : window.innerWidth;
	        
	veil.style.width=docwidth+"px"; //set up veil over page
    veil.style.bottom="0px"; //set up veil over page
	veil.style.display = "block";
}

function getScrollY() {
    var scrollY = 0;
    
    if( document.documentElement && document.documentElement.scrollTop ) {
        scrollY = document.documentElement.scrollTop;
    }
    else if( document.body && document.body.scrollTop ) {
        scrollY = document.body.scrollTop;
    }
    else if( window.pageYOffset ) {
        scrollY = window.pageYOffset;
    }
    else if( window.scrollY ) {
        scrollY = window.scrollY;
    }       
    return scrollY;
}

function hideQW(divVeil,qwdrag) {
   document.getElementById(divVeil).style.display = "none";
   document.getElementById(qwdrag).style.display="none";
}
/*
document.write('<div id="qwdrag" style="position:absolute;display:none;z-index:10001">');
document.write('<div id="qwtop"></div>');
document.write('<div id="qwbody" class="clearfix">');
document.write('<div>');
document.write('<div style="text-align:right;padding-right:10px;">');
document.write('<a href="#" onClick="hideQW();"><img src="/images/sa-close.gif" width="47" height="19" border="0" alt="Close" /></a><br />');
document.write('</div>');
document.write('</div>');
document.write('<div id="qwcustom" style="padding-left:10px;padding-right:10px;"></div>');
document.write('<div id="qwbottom"></div>');
document.write('</div>');
document.write('</div>');
document.write('<div id="divVeil" class="VeilStyle" style="display:none;z-index:10000;"></div>');
*/

