

function functOW(PH1,PH2,w,h)
{
	var w=window.open(PH1,PH2,"width=" + w + ",height=" + h + ",scrollbars=yes");
	w.focus();
}


function functMFW(PH1,PH2,w,h,pw,ph)
{

	var w=window.open(PH1,PH2,"width=" + (w+pw) + ",height=" + (h+ph) + ",scrollbars=no");
	w.focus();
}










var show_initXmediaX = new Array;
var init_initXmediaX = new Array;
var obj_initXmediaX = new Array;
var m_str_medialist_last_id = null;

function initXmedia1close()
{
	initXmedia1( m_str_medialist_last_id , 2 , 0 );
}

function initXmedia1( p_ID , p_v , p_def )
{

	m_str_medialist_last_id = p_ID;
	var s_ihdiv = "ihdiv" + p_ID;
	var s_ihpath = "ihpath" + p_ID;
	var s_obj = "obj" + p_ID;
	
	
	var i_height = 658;
	var i_width = 798;


	var b_show = false;

	
	if( p_v==2 )
	{				
		document.getElementById(s_obj).style.visibility = "hidden";
		document.getElementById(document.getElementsByName(s_ihdiv)[0].value).style.visibility = "hidden";
		document.getElementById(s_obj).style.height = "0px";
		document.getElementById(s_obj).style.width = "0px";
		b_show = false;
	}
	else
	{
		document.getElementById(document.getElementsByName(s_ihdiv)[0].value).innerHTML = '<iframe src="' + document.getElementsByName(s_ihpath)[0].value + '&defi=' + p_def + '" width="' + String(i_width) + '" height="' + String(i_height) + '" name="' + s_obj + '" id="' + s_obj + '" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" style="" ></iframe>';
		
		document.getElementById(document.getElementsByName(s_ihdiv)[0].value).style.visibility = "visible";
		document.getElementById(s_obj).style.visibility = "visible";
		document.getElementById(s_obj).style.height = String(i_height) + "px"; // !!!!!!!!!!!!!!!!!!!!!
		document.getElementById(s_obj).style.width = String(i_width) + "px";
		b_show = true;
	}
			
	initXmedia1_divpos( document.getElementById(document.getElementsByName(s_ihdiv)[0].value) , b_show , i_height , i_width );
		
}



function initXmedia1_divpos(p_ob__div , p_b_show , p_i_height , p_i_width )
{
	if( p_b_show==true )
	{
		document.getElementById("divmedialist0").style.visibility = "visible";
		document.getElementById("divmedialist0").style.height = String(document.getElementById("DIVCONT").offsetHeight) + "px";
		document.getElementById("divmedialist0").style.width = "100%";
		
		
		
		var i_win_w = 0;
		var i_win_h = 0;
	    if (window.innerHeight) 
		{   
	        i_win_w = window.innerWidth;
			i_win_h = window.innerHeight;
    	}   
	    else 
		{   
	       if (window.document.documentElement &&  window.document.documentElement.clientHeight) 
		   {   
	           i_win_w = window.document.documentElement.clientWidth;
			   i_win_h = window.document.documentElement.clientHeight;
    	   } 
		   else
		   {
	       	   i_win_w = window.document.body.offsetWidth;
			   i_win_h = window.document.body.offsetHeight;
		   }
	    }
		
		
		var i_scrOfX = 0, i_scrOfY = 0;
		if( typeof( window.pageYOffset ) == 'number'  ) 
		{
	        //Netscape
	        i_scrOfY = window.pageYOffset;
	        i_scrOfX = window.pageXOffset;
	    } 
		else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) 
		{
	        //DOM
	        i_scrOfY = document.body.scrollTop;
	        i_scrOfX = document.body.scrollLeft;
	    } 
		else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) 
		{
	        //IE6
	        i_scrOfY = document.documentElement.scrollTop;
	        i_scrOfX = document.documentElement.scrollLeft;
	    }
		
		
		
		var i_top = (i_win_h/2) - (p_i_height/2) + i_scrOfY;
		var i_left = (i_win_w/2) - (p_i_width/2);
		if( i_top<0 ) i_top=0;
		if( i_left<0 ) i_left=0;
		
		p_ob__div.style.height = String(p_i_height) + "px";
		p_ob__div.style.width = String(p_i_width) + "px";
		p_ob__div.style.top = String(i_top) + "px";
		p_ob__div.style.left = String(i_left) + "px";
		
		
		document.getElementById("divmedialistclose").style.visibility = "visible";
		document.getElementById("divmedialistclose").style.top = String(i_top-11) + "px";
		document.getElementById("divmedialistclose").style.left = String((i_left+p_i_width)-12) + "px";
		document.getElementById("divmedialistclose").style.height = "24px";
		document.getElementById("divmedialistclose").style.width = "24px";		
	}
	else
	{
		document.getElementById("divmedialist0").style.visibility = "hidden";
		document.getElementById("divmedialist0").style.height = "0px";
		document.getElementById("divmedialist0").style.width = "0px";
		
		p_ob__div.style.height = "0px";
		p_ob__div.style.width = "0px";
		p_ob__div.style.top = "0px";
		p_ob__div.style.left = "0px";
		
		
		document.getElementById("divmedialistclose").style.visibility = "hidden";
		document.getElementById("divmedialistclose").style.top = "0px";
		document.getElementById("divmedialistclose").style.left = "0px";
		document.getElementById("divmedialistclose").style.height = "0px";
		document.getElementById("divmedialistclose").style.width = "0px";
	}
}











var show_initXcalX = new Array;
var init_initXcalX = new Array;
var obj_initXcalX = new Array;
function initXcalX(p_ID,p_DIV , v,p,obj )
{
	//try
	//{
		
		// sLanguageVersion = LV;
		// sLanguageVersion = document.forms[0].d2aae4b5cdc94d2b8d7f25d66766a2f6.value;
		
		//document.getElementsByName(p_ID)[0].value = p_DIV;
		//document.getElementById(p_DIV).innerHTML = "Hallo Welt";
	
		
		var b_init = false;
		if( init_initXcalX[p_ID]!=null )
			if( init_initXcalX[p_ID]==true )
				b_init = true;
		
		var b_show = false;
		if( show_initXcalX[p_ID]!=null )
			if( show_initXcalX[p_ID]==true )
				b_show = true;
		
		
		if( b_init )
		{
			if( b_show )
			{
				document.getElementById(obj).style.visibility = "hidden";
				document.getElementById(obj).style.height = "0px";
				b_show = false;
			}
			else
			{
				document.getElementById(obj).style.visibility = "visible";
				document.getElementById(obj).style.height = "228px"; // !!!!!!!!!!!!!!!!!!!!!
				b_show = true;
			}		
		}
		else
		{
			
			b_init = true;
			document.getElementById(p_DIV).innerHTML = '<iframe src="' + document.getElementsByName(p)[0].value + '" width="200" height="228" name="' + obj + '" id="' + obj + '" scrolling="no" marginheight="0" marginwidth="0" frameborder="0"></iframe>';
			
			// obShowCalendar1 = document.getElementById("xShowCalendar1");
			obj_initXcalX[p_ID] = document.getElementById(obj);
			
			if( v==2 )
			{
				document.getElementById(obj).style.visibility = "hidden";
				document.getElementById(obj).style.height = "0px";
				b_show = false;
			}
			else
			{
				document.getElementById(obj).style.visibility = "visible";
				document.getElementById(obj).style.height = "228px"; // !!!!!!!!!!!!!!!!!!!!!
				b_show = true;
			}
		}
	
	
		init_initXcalX[p_ID] = b_init;
		show_initXcalX[p_ID] = b_show;
		
		
		
	
	//}
	//catch (e)
	//{
	//}
}


function initXcalX_SetDateTime(d,m,y,obj)
{
	try
	{
		if(typeof obj != 'undefined')
			obj.value = d + '.' + m + '.' + y;
	}
	catch (e)
	{
	}
}


function initXcalX_hideXcal1(d,m,y,sobj,shide)
{
	try
	{		
		if(  typeof document.getElementById(shide) != 'undefined' )
		{
			document.getElementById(shide).style.visibility = "hidden";
			document.getElementById(shide).style.height = "0px";

			if( show_initXcalX[sobj]!=null )
				show_initXcalX[sobj] = false;
		}
	}
	catch (e)
	{
	}
}







