var myWidth=1024, myHeight =768;
//
function detectWindowSize() {
	var outerW = 177, outerH = 50;
//  var myWidth = 0, myHeight = 0;
  if ( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
//	document.write(myWidth+' '+myHeight);
  } else if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
	myWidth -= outerW;
	if(myWidth<587)myWidth=587;
	myHeight = (480/587)*myWidth;
	myHeight = 450
}
//
function writeMainpageFlash(myUrl){
	detectWindowSize() ;
	//alert(myWidth+' '+myHeight);
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+myWidth+'" height="'+myHeight+'" id="mainFlash"><param name="movie" value="'+myUrl+'?propertyconfig=../includes/propertyLink.xml&flashwidth="'+myWidth+'""><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+myUrl+'?propertyconfig=../includes/propertyLink.xml&flashwidth="'+myWidth+'"" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+myWidth+'" height="'+myHeight+'" wmode="transparent" name="mainFlash"></embed></object>');
	//document.write(myWidth+' '+myHeight);
}
//
function resizeFlash(){
	detectWindowSize() ;
	//alert(myWidth+' '+myHeight);
	document.mainFlash.width=myWidth;
	document.mainFlash.height=myHeight;
}