
function getWinSize(win){
	var h=0; var w=0;
	if(top.dialogWidth){
		w = parseInt(dialogWidth) - 8;
		h = parseInt(dialogHeight);
		}
	 else if( typeof( window.innerWidth ) == 'number' ) { //Non-IE
    		w = window.innerWidth;
   		h = window.innerHeight;
		}
	 else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
   		 w = document.documentElement.clientWidth;
   		 h = document.documentElement.clientHeight; 
		}
	 else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
 		w = document.body.clientWidth;
    		h = document.body.clientHeight;
  		}
	if(top.standalone){
		if(top.widget){
			w += 2;
	 		} 
		else {
			if(document.all) {
				var ua = navigator.userAgent;
				var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    				if (re.exec(ua) != null)
     					rv = parseFloat( RegExp.$1 );
				if(rv<6.029){
					h -= 6;
					}
				if(rv<7){
	   				if(top.dialogArguments){ h -= 38;}
					else { h+=10; w +=8; }
					}
				else {
					w += 12;
					}
				}
	 		}
		}
	var s = new Object();
	s.h = h; s.w = w;
	return s;
	}
