/* Message Box
 * 	Usage:
 * 		Include the following html code just before your closing </body> and </html> tags
 *      
		<div class="MessageBoxPopupCSS" id="MessageBoxPopup">
			<div class="MessageBox-Menu" id="MessageBox-Menu"><span onclick="msgBox.close();" class="MessageBox-Menu-Item">X&nbsp;</span></div>
				<!-- Include your HTML code here -->
				<p style="color:black;">This is a test</p>
				<!-- Your code stops here -->
			
		</div>
 */
 
var msgBoxID = "MessageBoxPopup";
 
 function MessageBox(){
	 
	//New Methods that control message boxes
	//When this method is called, any message boxes on screen will close from view.
	 this.close = function(){
		 var element = document.getElementById(msgBoxID);
		element.style.visibility = "hidden";
	
		return true;
	 };
	 
	 this.show = function(){
		var element = document.getElementById(msgBoxID);
		element.style.visibility = "visible";
		
		//Center message Box
		var pos = new Array((document.width/2)-200, 150);
	    YAHOO.util.Dom.setXY('MessageBoxPopup', pos); 

		return true;	 
	 };
 }

 msgBox = new MessageBox();
(function() { 
	        var msgBox; 
	        YAHOO.util.Event.onDOMReady(function() {
	            msgBox = new YAHOO.util.DD(msgBoxID); 
				
				// Configure one or more child element as a drag handle 
        		msgBox.setHandleElId("MessageBox-Menu"); 
	        }); 
})();


/*Mics Functions */
function getWindowHeight() {
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
			}
			else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
				}
				else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
					}
				}
			}
			return windowHeight;
		}