function SetBodyOpacity(Opacity) {

	browserVer=parseInt(navigator.appVersion);
	browserName=navigator.appName;
	if (browserName == "Microsoft Internet Explorer"){
		document.body.style.filter = 'alpha(opacity='+Opacity+')';
	} else {
		document.body.style.opacity = Opacity/100;
	}
}

function CreateFadeOut(Url, Location, Opacity) {
	if (Opacity > 0) {
		parent.frames[Location].SetBodyOpacity(Opacity);
		Opacity -= 10;
		window.setTimeout("CreateFadeOut('"+Url+"', '"+Location+"', "+Opacity+")", 10);
	}
	else {
		if (Opacity <= 0) {
			window.open(Url, Location);
		}
	}
}

function CreateFadeOutAll(Url, Opacity) {
	if (Opacity > 0) {
		parent.frames['slide'].SetBodyOpacity(Opacity);
		parent.frames['title'].SetBodyOpacity(Opacity);
		parent.frames['index'].SetBodyOpacity(Opacity);
		Opacity -= 10;
		window.setTimeout("CreateFadeOutAll('"+Url+"', "+Opacity+")", 10);
	}
	else {
		if (Opacity <= 0) {
			window.open(Url, "_top");
		}
	}
}

function StartFadeIn() {
	SetBodyOpacity(0);
	CreateFadeIn(0);
}

function CreateFadeIn(Opacity) {
	if (Opacity < 100) {
		SetBodyOpacity(Opacity);
		Opacity += 5;
		window.setTimeout("CreateFadeIn("+Opacity+")", 10);
	}
}

function DoFadeOut(Url, Location) {
	CreateFadeOut(Url, Location, 100);
}

function DoFadeOutAll(Url) {
	CreateFadeOutAll(Url, 100);
}










function DoImageSize(h, b) {
	if (screen.height < "600") {
		maxb = 320;
		maxh = 320;
	} 
	if ((screen.height >= "600") && (screen.height <= "768")) {
		maxb = 400;
		maxh = 400;
	}
	if (screen.height > "768") {
		maxb = 512;
		maxh = 512;
	}
	if (h > maxh) {
		hprop = h/maxh;
		h = h/hprop;
		b = b/hprop;
	}
	if (b > maxb) {
		bprop = b/maxb;
		h = h/bprop;
		b = b/bprop;
	}
	document.getElementById("slide").height=h;
	document.getElementById("slide").width=b;
}

function DoFrameHeight (TdId) {
	myHeight = 0;
	if( typeof( window.innerHeight ) == 'number' ) {
		//Non-IE
		myHeight = window.innerHeight;
	} else if( (document.documentElement) && (document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myHeight = document.documentElement.clientHeight;
	} else if( (document.body) && (document.body.clientHeight ) ) {
		//IE 4 compatible
		myHeight = document.body.clientHeight;
	}
	myHeight -= 5;
	document.getElementById(TdId).height=myHeight;

}

