var resizeElem;
var posx = 0;
var startX = 0;
var doResize = false;
var plus1024 = false;

function mouseposition(ereignis){
	posx = document.all ? window.event.clientX : ereignis.pageX;
	resizeElements();
}

function getElements(elem1)
{
	//if(plus1024)
	//{
		resizeElem = new Array()
		startX = 0;
		resizeElem[0] = document.getElementById(elem1);	
		startX = posx;
		doResize = true;
	//}
}

function resizeElements()
{
	
}

function setElements(ev)
{
	if(doResize) {
		setFocusonTXT();
		doResize = false;
	}
}

document.onmousemove = mouseposition;	
document.onmouseup = setElements;	


function settxtsize(size) {
	var div = document.getElementById('txtseitendiv');
	if(size == 0)
		div.style.width = "100%";
	else
		div.style.width = size+"px";
}



function Fensterhoehe() {
	var myWidth = 0, 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;
	}
		
	return myHeight;
}

function Fensterbreite() {
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
	} else if( document.documentElement &&
		( document.documentElement.clientWidth ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
	} else if( document.body &&  document.body.clientWidth ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
	}
		
	return myWidth;
}



function showSite(url)
{
	window.location.href = url;			
}


function startfromsearch(id)
{
	if (document.layers){
		//Netscape 4 specific code
		pre = 'document.';
		post = '';
		post1 = '';		
	}
	if (document.getElementById){
		//Netscape 6 specific code
		pre = 'document.getElementById("';
		post = '").style';
		post1 = '")';		

	}
	if (document.all){
		//IE4+ specific code
		pre = 'document.all.';
		post = '.style';
		post1 = '';		
	}
	
	if(folienid.length > id)
	{
		aktLayer = eval(pre + "previewdiv0" + post);		
		aktLayer.display = "block";
		searched = id;
		gotoimage(searched);
		stoppic();
		fill(searched);
		if(document.getElementById("marker"+(searched))!=null)
		{
		m = eval(pre + "marker"+(searched) + post);		
		m.display="block";					
		}
	}
	
	else imggo();
	setimgsize();
	
}

function setcursor()
{
//	if(plus1024)
//	{
		document.body.style.cursor = 'e-resize';
//	}
}



function resizeScreen(typ) {
	GemeindeKanal_WebView.FullscreenTV.saveScreen(typ,cbresizeScreen);
}

function cbresizeScreen(res) {}

function showSite(url)
{
	window.location.href = url;			
}


function showHelp(infoval) {
	document.getElementById("pnlFolie").style.display = "none";
	document.getElementById("pnlNav").style.display = "none";
	document.getElementById("reiter1").style.display = "none";
	document.getElementById("pnlInfo1").style.display = "none";
	document.getElementById("pnlInfo2").style.display = "none";
	document.getElementById("pnlInfo3").style.display = "none";
	document.getElementById("pnlInfo4").style.display = "none";
	document.getElementById("pnlInfo5").style.display = "none";
					
	document.getElementById("pnlInfo"+infoval).style.display = "block";
}
