
var drag=0;
var offsetx;
var offsety;
var MoveOn=-600;
var mtab;
var aktiv;

document.onmousemove=dragdiv;
//document.onmousedown=toggledrag;


function toggledrag(e){
	if (drag==1)
		{
		drag=0;
		}
	else if (document.getElementById('Startbox').style.visibility=="visible")
		{
		posx=document.getElementById('Startbox').offsetLeft;
		posy=document.getElementById('Startbox').offsetTop;
		divwidth=document.getElementById('Startbox').offsetWidth;
		divheight=document.getElementById('Startbox').offsetHeight;
		
		if (document.all)
			{
			offsetx=window.event.x;
			offsety=window.event.y;
			}
		else
			{
			//offsetx=e.pageX;
			//offsety=e.pageY;
			}
		
		if ((offsetx>=posx) && (offsetx<=posx+divwidth) && (offsety>=posy) && (offsety<=posy+divheight))
			{
			offsetx-=posx;
			offsety-=posy;
			drag=1;
			}
		}
	}

function dragdiv(e){
	if (drag==1)
		{
		if (document.all)
			{
			mousex=window.event.x;
			mousey=window.event.y;
			}
		else
			{
			mousex=e.pageX;
			mousey=e.pageY;
			}
		mousex-=offsetx;
		mousey-=offsety;
		document.getElementById('Startbox').style.top=mousey+"px";
		document.getElementById('Startbox').style.left=mousex+"px";
		}
	}

function sI(){
	var cInfoTitle='<SPAN style="color: #FFFFFF;font-weight: bold;text-decoration: underline;">Gewinnspiel für Traveller und Reiseexperten!</SPAN>'

	var cInfoText='<TABLE width="95%" border="0" cellpadding="5" cellspacing="0">'+
	'<TR>'+
	'<TD>'+
	'<IMG src="/Virtuellweb/Images/ToSeeBeforeYouDie.jpg" width="150" border="0">'+
	'</TD>'+
	'<TD valign="middle" style="text-align: justify;">'+
	'<SPAN style="color: #303030;font-size: 12px;font-weight: bold;">Unter allen bis zum 31.5.2007 auf mein Reiseland veröffentlichten Reiseberichten wird ein Reiselandhantuch verlost.</SPAN><BR><BR>'+
	'Einfach Registrieren einen Reisebericht schreiben und gewinnen bei www.meinReiseland.de<BR><BR>'+
	'<A HREF="/Kunden/kunden.asp?Action=new">Registrieren Sie sich jetzt!</A>'+
	'</TD>'+
	'</TR>'+
	'</TABLE>'

	var cStartbox='<TABLE width="600" height="100%" border="0" cellpadding="0" cellspacing="0" style="margin: 0px; padding: 0px;">'+
	'<TR>'+
	'<TD style="cursor:pointer;" class="box_title_left" onmouseup="toggledrag();" onmousedown="toggledrag();"><IMG src="/Virtuellweb/Images/spacer.gif" width="1" height="1" border="0"></TD>'+
	'<TD style="cursor:pointer;" class="box_title" width="94%" nowrap onmouseup="toggledrag();" onmousedown="toggledrag();">'+cInfoTitle+'</TD>'+
	'<TD class="box_title" align="right" valign="middle"><IMG SRC="/Images/StartBox/close.gif" WIDTH="20" HEIGHT="20" BORDER="0" ALT="schliessen" onclick="hI();" style="cursor: pointer;"></TD>'+
	'<TD class="box_title_right"><IMG src="/Virtuellweb/Images/StartBox/spacer.gif" width="1" height="1" border="0"></TD>'+
	'</TR>'+
	'<TR>'+
	'<TD class="box" colspan="4" style="padding:5px;">'+cInfoText+'</TD>'+
	'</TR>'+
	'</TABLE>';

	//mtab=document.getElementById('Startbox');
	if (mtab){
		mtab.style.visibility="visible";
		document.getElementById('InfoText').innerHTML=cStartbox;
		mtab.style.top=155;
		aktiv = window.setInterval("MoveMyDiv()", 2);
	}
}

function MoveMyDiv(){
	mtab.style.left=MoveOn;
	MoveOn = MoveOn + 8
	if(MoveOn>=150){
		window.clearInterval(aktiv);
	}
}

function hI(){
	var mtab=document.getElementById('Startbox');
	if (mtab){
		mtab.style.posLeft=-500;
		mtab.style.posTop=-500;
		mtab.style.visibility="hidden";
	}
}

