
function openDIV(a)
{
	if(document.getElementById(a).style.display=='none')
	{
		document.getElementById(a).style.display='block';
	}else
	{
		document.getElementById(a).style.display='none';
	}
}

function hideDIV(a)
{
		document.getElementById(a).style.display='none';
}

function start()
{
	if(navigator.userAgent.indexOf('MSIE') > -1){
		
		var bodyHeight = document.body.scrollHeight + 50;

	}
	if(navigator.userAgent.indexOf('Gecko') > -1){
		
		var bodyHeight = document.body.scrollHeight + 50;
	}

	
	
	if (bodyHeight > 950)
	{
		return document.getElementById('nachOben').style.display='block';
		
	}else
	{
		return document.getElementById('nachOben').style.display='none';
	}
}


function getPrint()
{
	var input = document.getElementById('core').innerHTML;
	//loadLoader();
	xajax_getPrint(input);
}

function getPrintNewsletter()
{
	var input = document.getElementById('main_table').innerHTML;
	//loadLoader();
	
	xajax_getPrintNewsletter(input);
}


function showPrint(f)
{
	//unloadLoader();
	if(window.location.hostname=='jnitsch')
	{
		window.open('http://jnitsch/docware2010/'+f+'.php','popup', 'width=580, height=600, resizable=yes, scrollbars=yes');
	}
	else
	{
		window.open('http://www.docware.de/'+f+'.php','popup', 'width=580, height=600, resizable=yes, scrollbars=yes');
	}
}

function showPrintNewsletter(f)
{
	//unloadLoader();
	if(window.location.hostname=='jnitsch')
	{
		window.open('http://jnitsch/docware2010/'+f+'.php','popup', 'width=580, height=600, resizable=yes, scrollbars=yes');
	}
	else
	{
		window.open('http://www.docware.de/'+f+'.php','popup', 'width=580, height=600, resizable=yes, scrollbars=yes');
	}
}

function getBookmark()
{
	var title;
	var url;
	
	title = "Elektronische Ersatzteilkataloge:  www.docware.de";
	url = "http://www.docware.de";
	
	if (window.sidebar) //Firefox
	{
		window.sidebar.addPanel(title, url, "http://www.docware.de");
	}
	else if(window.opera && window.print) // Opera
	{ 
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	}
	else if(document.all) // ie
	{
		window.external.AddFavorite(url, title);
	}
}

function setAnchor(a)
{
		switch (a)
		{
			case 'ic':window.scrollTo(0,880);break;
		}
}

/*
function showEmailMask() 
{
	var WindowWidth = 0;
	var WindowHeight = 0;
	
	var content;
	
	content = '<br><br><br><h3><center><b>Email- Formular</b></h3><br><br><div onmouseover="this.style.cursor=\'pointer\'" onclick="closeShowEmailMask();"><b>schliessen</b></div></center>';
	
	
	if( typeof( window.innerWidth) == 'number' )
	{
	//Non-IE
		WindowWidth = window.innerWidth;
 		WindowHeight = window.innerHeight;
	} 
	else if(document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
	{
		//IE 6+ in ’standards compliant mode’
	 	WindowWidth = document.documentElement.clientWidth;
		WindowHeight = document.documentElement.clientHeight;
		
	} 
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
	{
		//IE 4 compatible
		WindowWidth = document.body.clientWidth;
 		WindowHeight = document.body.clientHeight;
	}
	
	loadDiv=document.createElement("div");
	loadDiv.innerHTML = content;

	loadDiv.className = "loadDivContainer";
	loadDiv.id = "loadDivContainer";
	loadDiv.style.position = 'absolute';
	
	
	// Vollbild 
	loadDiv.style.top = 0;
	loadDiv.style.left = 0;
	loadDiv.style.width = WindowWidth;
	loadDiv.style.height = WindowHeight;
	
	
	//loadDiv.style.top = eval((WindowHeight / 2) + "+" + document.body.scrollTop);
	//loadDiv.style.left = WindowWidth / 5.2;
	
	//loadDiv.style.width = 525;
	//loadDiv.style.height = 300;
	loadDiv.style.border="1px solid #000000"; 
	
	loadDiv.style.filter = 'Alpha(opacity=88)';
	loadDiv.style.opacity = 0.5;
	loadDiv.style.background = '#ffffff';
	document.body.appendChild(loadDiv);
	
}

function closeShowEmailMask()
{
	document.body.removeChild(document.getElementById('loadDivContainer'));
	
}

*/



function verifySeminare()
{
	
	if (document.getElementById('Wuerzburg').checked==false && document.getElementById('Duesseldorf').checked==false )
	{
		alert("Wählen Sie bitte einen Termin!");
	}
			
	else
	{
		return xajax_emailVerif(document.getElementById('emailVeri').value);
	}
}

function verifyWorkshop()
{
	
	if (document.getElementById('ersterBox').checked==false && document.getElementById('zweiterBox').checked==false )
	{
		alert("Wählen Sie bitte einen Termin!");
	}
			
	else
	{
		return xajax_emailVerif(document.getElementById('emailVeri').value);
	}
}




function setBrancheReferenz(e)
{
	var sel =  document.getElementById('selRefBranchen').value=e;
	return sel.selected=true;
}


function setAnwendugnenReferenz(f)
{
	var sel = document.getElementById('selRefAnwendungen').value=f;
	return sel.selected=true;
}


function setIntegrationReferenz(g)
{
	var sel =  document.getElementById('selRefIntegration').value=g;	
	return sel.selected=true;
}

function landingPage_zeigeForm()
{
	document.getElementById('zumDemo').style.display='none';
	document.getElementById('zeigeForm').style.display='block';
	
	document.getElementById('addNotice').style.display='none';
}



function loadLoader() 
{
	var WindowWidth = 0;
	var WindowHeight = 0;
	
	if( typeof( window.innerWidth) == 'number' )
	{
	//Non-IE
		WindowWidth = window.innerWidth;
 		WindowHeight = window.innerHeight;
	} 
	else if(document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
	{
		//IE 6+ in ’standards compliant mode’
	 	WindowWidth = document.documentElement.clientWidth;
		WindowHeight = document.documentElement.clientHeight;
		
	} 
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
	{
		//IE 4 compatible
		WindowWidth = document.body.clientWidth;
 		WindowHeight = document.body.clientHeight;
	}
	
	
	
	loadDiv=document.createElement("div");
	loadDiv.className = "loadDivContainer";
	loadDiv.id = "loadDivContainer";
	loadDiv.style.position = 'absolute';
	
	
	// Vollbild 
	//loadDiv.style.top = 0;
	//loadDiv.style.left = 0;
	//loadDiv.style.width = WindowWidth;
	//loadDiv.style.height = WindowHeight;
	

	loadDiv.style.top = eval((WindowHeight / 3.8) + "+" + document.body.scrollTop);
	loadDiv.style.left = WindowWidth / 2.7;
	
	loadDiv.style.width = 400;
	loadDiv.style.height = 300;
	loadDiv.style.border="1px solid #000000"; 
	
	loadDiv.style.filter = 'Alpha(opacity=99)';
	loadDiv.style.opacity = 0.5;
	loadDiv.style.background = '#ffffff';
	document.body.appendChild(loadDiv);

	imgLeft = WindowWidth / 2;
	imgTop = eval((WindowHeight / 2.6) + "+" + document.body.scrollTop);
	
	
	
	var img=document.createElement('IMG');
	img.id = 'loaderImg';
	img.src = 'images/ajax-loader2.gif';
	img.style.position = 'absolute';
	img.style.left=imgLeft;
	img.style.top=imgTop;
	document.body.appendChild(img);


}


function unloadLoader()
{
	document.body.removeChild(document.getElementById('loadDivContainer'));
	document.body.removeChild(document.getElementById('loaderImg'));
	
	
}



