var DefaultClassObject = {create: function() {return function() {this.initialize.apply(this, arguments);}
}
}
var HWWeb = DefaultClassObject.create();HWWeb.prototype = {themeName : "dialog",
width : 400,
height : 200,
top : 0,
left : 0,
winObj : null,
winID : "",
title : "",
url : "http://about:blank/",
initialize: function(id) {this.winID = id +  Math.random().toString(16).substring(2);},
showWindow : function (oArg) {this.width = oArg.width || this.width;this.height = oArg.height || this.height;this.left = oArg.left || this.left;this.top = oArg.top || this.top;this.themeName = oArg.themeName || this.themeName;this.title = oArg.title || this.title;this.url = oArg.url || this.url;this.winObj = new Window(this.winID, {className: this.themeName, title:  this.title, 
top:this.top, left:this.left, width:this.width, height:this.height, 
closable: true, url: this.url, hideEffectOptions: {duration:1}, showEffectOptions: {duration:1}});this.winObj.setDestroyOnClose();this.winObj.show();},
showDialog : function (oArg) {this.width = oArg.width || this.width;this.height = oArg.height || this.height;this.left = oArg.left || this.left;this.top = oArg.top || this.top;this.themeName = oArg.theme || this.themeName;this.title = oArg.title || this.title;this.url = oArg.url || this.url;this.winObj = new Window(this.winID, {className: this.themeName, title:  this.title, 
top:this.top, right:this.left, width:this.width, height:this.height, 
resizable: true, url: this.url});this.winObj.setDestroyOnClose();this.winObj.show(true);}, 
findWindow : function (id) {return (Windows.getWindow(id));},
findWindowFrom : function (id, from) {return (from.Windows.getWindow(id));},
toFront : function () {this.winObj.toFront();}
}
function isWinExist(id) {var exist = false;var win = Windows.getWindow(id);if (win && win.visible) {exist = true;}
return(exist);}
function closeAllWindows() {Windows.closeAll();}
function closeAllModalWindows() {Windows.closeAllModalWindows();}
function tileAllWindows(xRatio, yRation) {var x = xRatio;var y = yRation;Windows.windows.each( function(w) {if (w.getId != null) {w.setLocation(x,y);w.toFront();x += xRatio;y += yRation;}
});}
function opacity(id, opacStart, opacEnd, millisec) {var speed = Math.round(millisec / 100);var timer = 0;if(opacStart > opacEnd) {for(i = opacStart;i >= opacEnd;i--) {setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));if(i==0)
isTopBarClose= 'No';timer++;} 
} else if(opacStart < opacEnd) {for(i = opacStart;i <= opacEnd;i++){setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));timer++;} 
} 
}
function changeOpac(opacity, id) {var object = document.getElementById(id).style;object.opacity = (opacity / 100);object.MozOpacity = (opacity / 100);object.KhtmlOpacity = (opacity / 100);object.filter = "alpha(opacity=" + opacity + ")";if(opacity==0)
document.getElementById(id).style.display = 'none';} 
function shiftOpacity(id, millisec,showOpac) {if(showOpac=='Y'){opacity(id, 1, 100, millisec);} else {opacity(id, 100, 0, millisec);} 
}



