function SetWinHeight(obj)
{
var win=obj;
if (document.getElementById)
{
    if (win && !window.opera)
    {
     if (win.contentDocument && win.contentDocument.body.offsetHeight) 
     {
      win.height = win.contentDocument.body.offsetHeight; 
      win.width =win.contentDocument.body.offsetWidth;
      }
     else if(win.Document && win.Document.body.scrollHeight)
     {
      win.height = win.Document.body.scrollHeight;
      win.width=win.Document.body.scrollWidth;
      }
    }
}
}


var LoadCheckTime = 0;
function MovieLoadPercent()
{

	var movie = document.getElementById("ZwCadFlashObjectControl");
	var nPercentLoaded = Math.abs(movie.PercentLoaded());
	LoadCheckTime +=1;
	if(nPercentLoaded != 100)
	{
		if(LoadCheckTime < 3 || nPercentLoaded >0)
		{
			setTimeout("MovieLoadPercent()",100);
			return;
		}
		else
			{
				document.getElementById("ErrorMessage").style.display = '';
				return;
			}
	}
	else
		{
			showHide("collapsible_movie");
		}
}


function RunFlash()
{
	try{
		var swf = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
		}
		catch(e){
			document.getElementById("ErrorMessage").style.display = '';
			return;
		}
		MovieLoadPercent();
}
function hideElement(theEl) {
    theEl.style.display = 'none';
}
function showElement(theEl) {
    theEl.style.display = '';
}
function showHide(theId) {
    if (document.getElementById) { // DOM3 = IE5, NS6
        var el = document.getElementById(theId);
        if (el === null) {
            return;
        }
        if (el.style.display == 'none') {
            showElement(el);
        }
        else {
            hideElement(el);
        }
    }
}
function trimRelativePath(path) {
    if (path.indexOf('./') === 0) {
        return trimRelativePath(path.substring(2));
    } else if (path.indexOf('../') === 0) {
        return trimRelativePath(path.substring(3));
    } else if (path.indexOf('../') > 0) {
        if (path.indexOf('/') < path.indexOf('../')) {
            return trimRelativePath(path.substring(0, path.indexOf('/')) + path.substring(path.indexOf('../') + 3));
        } else {
            return path;
        }
    } else {
        return path;
    }
}
function swapImage(theImage1, theImage2) {
    if(theImage1.style.display=='none')
    {
    	theImage1.style.display='';
    	theImage2.style.display='none';
    }else{
    	theImage2.style.display='';
    	theImage1.style.display='none';    	
    }

}