
function openPopup(url, breite, hoehe, name ){
//alert( url + breite +  hoehe +name ); 

	var positionX=((screen.availWidth / 2) - breite / 2); 
	var positionY=((screen.availHeight / 2) - hoehe / 2); 
//alert( " " +  positionX + " " + positionY); 
	
	pop=window.open('',name,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,fullscreen=0,width='+breite+',height='+hoehe+',top='+positionY+',left='+positionX+''); 
	
	pop.location=url; 
}
function openPopupScrollbar(url, breite, hoehe, name ){

	var positionX=((screen.availWidth / 2) - breite / 2); 
	var positionY=((screen.availHeight / 2) - hoehe / 2); 
	
	pop=window.open('',name,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,fullscreen=0,width='+breite+',height='+hoehe+',top='+positionY+',left='+positionX+''); 
	
	pop.location=url; 
}

/* OPENEER *********************/
root = ""; 
/*root = "/alpina/"; */
/*root = "http://alpina.staging-server.com/"; */
/*root = "http://devalpina.impartner.de/";*/
/*root = "http://alpina.impartner.de/";*/

/*
function openSpot(name){
		openPopup( root + "/DesktopModules/IMPMoviePlayer/IMPMoviePlayer.aspx?name=" + name, 520, 490, "spot");
}
*/
function open_trend_popup(Tabid,name)
{
	openPopup( root + "/portal/tabID__" + Tabid +"/DesktopDefault.aspx", 514, 570, name); 
}

function openMemoryQuiz(){
	openPopup( root + "/aktionen/memory_quiz/index.asp", 790, 740, "quiz");
}

function openSpot(name, hd){
		
		openPopup( root + "/DesktopModules/IMPMoviePlayer/IMPMoviePlayer.aspx?name=" + name +"&hd=" + hd, 515, 485, "apot");
}

function openLexicon(){
	
	openPopup( root + "/DesktopModules/IMPLexikon/IMPLexikon.aspx" , 520, 420, "lexi");
}

function goRaeumePlanenRoot(){
	location.href=root + "/portal/tabID__34/DesktopDefault.aspx";

}
function goRaeumePlanenRootInt(){
	location.href=root + "/portal/tabID__277/DesktopDefault.aspx";

}
function openTAD(){
	
	openPopup( root + "/DesktopModules/IMPTAD/IMPTAD.aspx" , 493, 568, "tad");
}

function openDatenschutz(){

	openPopup( root + "/DesktopModules/IMPDatenschutz/IMPDatenschutz.aspx" , 520, 410, "ds");
}

function openLexiLink(link){
	
	openPopup( root + link , 520, 420, "lexi");
}


function openColordesigner(){
	
	openPopup( "/colordesigner/colordesigner.html" , 760, 550, "cd");
}



function goAlpinaWeiss(){
	location.href= root +"/portal/ugid__2/productid__1/tabID__126/DesktopDefault.aspx" ;
}
function goAlpinaWeiss(){
	location.href= root +"/portal/ugid__2/productid__13/tabID__126/DesktopDefault.aspx" ;
}
function goStick(){
	location.href= root +"/portal/ugid__2/productid__14/tabID__126/DesktopDefault.aspx" ;
}

function goSensan(){
	location.href= root +"/portal/ugid__2/productid__3/tabID__126/DesktopDefault.aspx" ;
}
function goTrend(){
	location.href= root +"/portal/tabid__386/default.aspx" ;
}
function goLasur(){
	location.href= root +"/portal/ugid__2/productid__91/tabID__238/DesktopDefault.aspx" ;
}

function goInnenfarbe(){
	location.href= root +"/portal/ugid__2/productid__10/tabID__126/DesktopDefault.aspx" ;
}
function goSystem(){
	location.href= root +"/portal/ugid__2/productid__102/tabID__126/DesktopDefault.aspx" ;
}
function goLacke(){
	location.href= root +"/portal/tabID__49/DesktopDefault.aspx" ;
}
function goLacke(){
	location.href= root +"/portal/tabID__49/DesktopDefault.aspx" ;
}
function goFassade(){
	location.href= root +"/portal/ugid__25/productid__29/tabID__126/DesktopDefault.aspx" ;
}
function goLStyle(){
	location.href= root +"/portal/tabID__47/DesktopDefault.aspx" ;
}
function goLWhite(){
	location.href= root +"/portal/tabID__46/DesktopDefault.aspx" ;
}
function goStudio(){
	location.href= root +"/portal/tabID__48/DesktopDefault.aspx" ;
}
function goAirClean(){
	location.href= root +"/portal/ugid__2/productid__105/tabID__126/DesktopDefault.aspx" ;
}



function openMAFO(){
/*	openPopup( root + "/DesktopModules/IMPMAFO/IMPMAFO.aspx" , 493, 568, "tad");  */
	openPopupScrollbar( "http://www.farbe-licht.de/gewinn.html" , 690,610, "tad");

}

function opennimm3(){
	openPopup( "http://195.82.66.141/alpina_herbstaktion/index.htm" , 700 , 540 , "n3");
}

function openColorPopup(id){
	width=255; height=257; /* default */
	
	if (id==66){ width=319; height=345; } /* 2in1 buntlack */
	if (id==14){ width=510; height=601; } /* colorstick */
	if (id==81){ width=446; height=345; } /* buntlack */
	if (id==15){ width=194; height=176; } /* sensancolor */
	if (id==42){ width=257; height=260; } /* atelier color */
	if (id==46){ width=257; height=259; } /* accent */
	height += 30;
	openPopup( root + "/DesktopModules/IMPProdukte/colorPopup/Colorpopup.aspx?id=" + id , width, height, "tad");
}
function show_Helptext(lblid,text)
{
  var d = document.getElementById(lblid);
  d.innerHTML = text;

}

function closelayerkatze () 
{

	elem = document.getElementById('flash_divkatze');
	if (elem) 
	{
		elem.style.display='none';
	}

/*	return false; */
}
function adlayerhider () 
{

	elem = document.getElementById('flash_divIDLayer');
	if (elem) 
	{
		elem.style.display='none';
	}

/*	return false; */
}


/* Hidden insight */

his_timoutid =""
his_timeout = 1000;
his_timer = 0;
function his_do_closelayer () 
{
	elem = document.getElementById(his_timoutid);
	if (elem) 
	{
		elem.style.display='none';
		his_timoutid = "";
	}
}
function his_closelayer (layerID) 
{
	if (his_timoutid != layerID)
	{
		elem = document.getElementById(his_timoutid);
		if (elem) 
		{
			elem.style.display='none';
		}
	}
	his_timoutid = layerID;
	his_timer = window.setTimeout("his_do_closelayer()", his_timeout); 
}
function his_showlayer (layerID) 
{
	if (his_timoutid != "") 
	{
		if (his_timer != 0)
		{
		 window.clearTimeout(his_timer);
		 his_timer = 0;
		}

		if (his_timoutid == layerID)
		{
			his_timoutid = "";
		}
		
			
		if (his_timoutid != "")
		{ 
			elem = document.getElementById(his_timoutid);
			if (elem) 
			{
				elem.style.display='none';
			}
		}
	}
	elem = document.getElementById(layerID);
	if (elem) 
	{
		elem.style.display='block';
		his_timoutid = layerID;
	}
}

/* Lexicon insight */
lexi_timoutid =""
lexi_timeout = 1000;
lexi_timer = 0;
function lexi_do_closelayer () 
{
	elem = document.getElementById(lexi_timoutid);
	if (elem) 
	{
		elem.style.display='none';
		lexi_timoutid = "";
	}
}
function lexi_closelayer (layerID) 
{
	if (lexi_timoutid != layerID)
	{
		elem = document.getElementById(lexi_timoutid);
		if (elem) 
		{
			elem.style.display='none';
		}
	}
	lexi_timoutid = layerID;
	lexi_timer = window.setTimeout("lexi_do_closelayer()", lexi_timeout); 
}
function lexi_showlayer (layerID) 
{
	if (lexi_timoutid != "") 
	{
		if (lexi_timer != 0)
		{
		 window.clearTimeout(lexi_timer);
		 lexi_timer = 0;
		}

		if (lexi_timoutid == layerID)
		{
			lexi_timoutid = "";
		}
		
			
		if (lexi_timoutid != "")
		{ 
			elem = document.getElementById(lexi_timoutid);
			if (elem) 
			{
				elem.style.display='none';
			}
		}
	}
	elem = document.getElementById(layerID);
	if (elem) 
	{
		elem.style.display='block';
		lexi_timoutid = layerID;
	}
}



