var fullscreen = true;

var justSized =false;

var settedheight = 0;

function getRealHeight(){

                if (navigator.userAgent.indexOf('MSIE')>0){

                               return document.body.clientHeight;

                }else {

                               return window.innerHeight;

                }

 

}

function getRealWidth(){

                if (navigator.userAgent.indexOf('MSIE')>0){

                               return document.body.clientWidth;

                }else {

                               return window.innerWidth;

                }

 

}

function setHeight(pHeight) {

                if (navigator.userAgent.indexOf('Firefox')>-1 && navigator.userAgent.indexOf('Mac')>-1 ) {

 

                               var FFHeight = ((pHeight*100)/getRealHeight());

                               var newHeight = new String(FFHeight+"%");

                               var newWidthSmall = "100%";

                               var newHeightSmall = "560px";

                } else {

                               var newHeight = new String(pHeight+"px");

                               var newWidthSmall = "960px";

                               var newHeightSmall = "560px";

                }

 

                if(ckeckIfSmallRes()){

                               document.getElementById("swfContainer").style.width = newWidthSmall;
                               //so.element.style.width = newWidthSmall;

                              document.getElementById("swfContainer").style.height = newHeightSmall;

                }else{

                               document.getElementById("swfContainer").style.width = newWidthSmall;

                               document.getElementById("swfContainer").style.height = newHeight;

                }

                settedheight = pHeight;

                fullscreen = false;

                //return so.attributes.height;
                //return pHeight;

}

function setFullHeight() {

                if(ckeckIfSmallRes()){

                              document.getElementById("swfContainer").style.width = '960px';

                               document.getElementById("swfContainer").style.height = '560px';

                }else{

                              document.getElementById("swfContainer").style.width = '100%';

                              document.getElementById("swfContainer").style.height = '100%';

                }

                fullscreen = true;

                //return so.attributes.height;

}

function setPosition(pPos){

                window.scrollTo(0,pPos);

}

function ckeckIfSmallRes(){

                return   (getRealHeight()<560 || getRealWidth()<960);

}

function smallRes() {

 

                var smallRes = ckeckIfSmallRes();

                if (smallRes){

                   if (getRealWidth()<960){

                                               document.getElementById("swfContainer").style.width = '960px';

                               }else{

                                               document.getElementById("swfContainer").style.width = '100%';

                               }

                               //if (getRealHeight()<610){

                                             document.getElementById("swfContainer").style.height = '560px';

                               /*}else{

                                               so.element.style.height = '100%';

                               }*/

                }else {
                if (fullscreen){
                                               setFullHeight();
                               }else{
                                               setHeight(settedheight) ;
		}
}
return smallRes;
}

function resizeFlash (){
	smallRes();
}
window.onresize = resizeFlash;
window.onload= resizeFlash;