/*
	N/ADMIN XTNSN 01.09.05
	
	





                              JgMMMMMMMMMMMNNgJ
                         +MMMMMMYYT777??7777YWMMMMNg
                     JMMMMB=                     ?TMMMNa
                   MMMMY                             ?WMMMa
                JMMMD                                   ?MMMN
              JMMMY                                        TMMN
            JMMM@                                            TMMb
           MMMM^                                               MMN
          MMM#                                                  UMN
         MMM@       JgMMMMMMMMMMMN&                              TMN
        MMM#     JMMMMMMMMMMMMMMMMMMNJ                            WMN
       dMMM    dMMMMMMMMMMMMMMMMMMMMMMN;                           MMr
       MMMF   MMMMMMMMMMMMMMMMMMMMMMMMMMN                          JMN
      JMM#   dMMMMMMMMMMMMMMMMMMMMMMMMMMMN                          MM
      MMMF   MMMMMMMMMMMMMMMMMMMMMMMMMMMMMN                         MM;
      MMM%   MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMb                       JMM
      MMM;  dMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN                       MM#
      MMM|  MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM;                     JMM%
      MMML  JMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM                      MMF
      MMMN   UMMMMMMMMMMMMMMMMMMMMMMMMMMMMM@                     MM@
      JMMMN   TMMMMMMMMMMMMMMMMMMMMMMMMMMMF                      MM^
      JMMMb    ?MMMMMMMMMMMMMMMMMMMMMMMMM=    JgNNNNMNNJ        MMN
     JMMMMMb    ?MMMMMMMMMMMMMMMMMMMMMM@    dMMMMMMMMMMML     dMMM^
    JMMF  WMN     TMMMMMMMMMMMMMMMMMMB     JMMMMMMMMMMMM^   JMMMD
    MM#    JMMa       7YMMMMMMMMHYT^   gr  ?MMMMMMMMMMM^  JMMMM^
   MMM%      ?MMm           ?      JMMMMN   ?MMMMMMMMY  JMMMMD
  JMMM         MMMNa              MMMMMM#     YMMMB=  JMMMM@
  MMMMNMMMMMMMMMMMMMMMNJ         ??77777^           dMMMM@
  ?MMMMMBT7?    JMMMF?TMMMMNgJ                  JMMMMMM3
                 MMMF     7YMMMMMMMMMNNNNNNNMMMMM94MMMt
                  MM#      JMMMM@777TUMMMM#9=?    dMM@
                  JMM    JMMMMMM     dMMMMN       MMM
                   MMr JMMM#=?MMN    MM#?7MMN    MMM^
                   MMMMMM#^   ?MMb  dMMF  JMMMMMMMM^
                   7MMM#^      ?MMNMMMM     TMMMM#
                     =           MMMMM%        7Y3
                                  TMMD



	
*/

/*
if (window.Event)
  document.captureEvents(Event.MOUSEUP);
function nocontextmenu()
{
	event.cancelBubble = true
	event.returnValue = false;

	return false;
}
function norightclick(e)
{
	if (window.Event)
	{
		if (e.which == 2 || e.which == 3)
			return false;
	}
	else
		if (event.button == 2 || event.button == 3)
		{
			event.cancelBubble = true
			event.returnValue = false;
			return false;
		}
}
document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;
drag = 0
move = 0
function init() {
	window.document.onmousemove = mouseMove
	window.document.onmousedown = mouseDown
	window.document.onmouseup = mouseUp
	window.document.ondragstart = mouseStop
}
function mouseDown() {
	if (drag) {
		clickleft = window.event.x - parseInt(dragObj.style.left)
		clicktop = window.event.y - parseInt(dragObj.style.top)
		dragObj.style.zIndex += 1
		move = 1
	}
}
function mouseStop() {
	window.event.returnValue = false
}
function mouseMove() {
	if (move) {
		dragObj.style.left = window.event.x - clickleft
		dragObj.style.top = window.event.y - clicktop
	}
}
function mouseUp() {
	move = 0
}
*/
function noSpam(user,domain) {
locationstring = "mailto:" + user + "@" + domain;
window.location = locationstring;
}



// --------------------------------------------------- SUPPER POP

function popps(theURL,winName,features) { //v2.0
	//window.open(theURL,'POPS','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=660,height=750\');
	window.open(theURL,'POPS',features);
}


// --------------------------------------------------- TOGGLE PLAYER LAYER

function toggleLayer(whichLayer)
{
if (document.getElementById)
{
	// this is the way the standards work
	var style2 = document.getElementById(whichLayer).style;
	style2.display = style2.display? "":"block";
}
else if (document.all)
{
	// this is the way old msie versions work
	var style2 = document.all[whichLayer].style;
	style2.display = style2.display? "":"block";
}
else if (document.layers)
{
	// this is the way nn4 works
	var style2 = document.layers[whichLayer].style;
	style2.display = style2.display? "":"block";
}
}


// --------------------------------------------------- postit
var postit_x = 0;
var postit_y = 0;
var iid;
//var _open = true;

function setPostIt(_x, _y, _iid, topen)
{   
    postit_x = _x;
    postit_y = _y;
    setPostitPos = ("postit_x="+postit_x +"&postit_y=" +postit_y+"&iid="+ _iid +"&open="+ topen +";");//MD5
    CookieSetz("postit", setPostitPos,20);
}

function postItQuit(_quit)
{
    setPostitPos = ("quit="+ _quit + ";");//MD5
	CookieSetz("postit",  setPostitPos,20);
   	var style2 = document.getElementById("postIt").style.display = "none";
}

function postItSwitch(_topen, _iidd)
{
    if(_topen){
        // schliessen
        document.getElementById("postOpen").style.display = "none";
        //document.getElementById("postOpen").style.background = "transparent";
   	    document.getElementById("postClosed").style.display = "block";

        document.getElementById("bt0").style.display = "none";
   	    document.getElementById("bt1").style.display = "block";   	    

   	    _open = false;
    } else {
        // wieder oeffnen
        document.getElementById("postOpen").style.display = "block";
   	    document.getElementById("postClosed").style.display = "none";
   	    
   	    document.getElementById("bt0").style.display = "block";
   	    document.getElementById("bt1").style.display = "none";   	
        
        _open = true;
    }
    var setPostitPos1 = "postit_x="+ dd.elements.postIt.x +"&postit_y=" + dd.elements.postIt.y+"&iid="+ _iidd+ "&open="+_open +";";
    CookieSetz("postit",  setPostitPos1,20);
 
}


// --------------------------------------------------- cookies
function CookieSetz(Bezeichner,Wert,Dauer)
{
      jetzt=new Date();
      Auszeit=new Date(jetzt.getTime()+Dauer*3600);
      document.cookie=Bezeichner+"="+Wert+";expires="+Auszeit.toGMTString()+";";
}
function CookieLesen()
{
      alert(Wert);
      Wert = "--";
      if(document.cookie)
      {
      Wertstart = document.cookie.indexOf("=") + 1;
      Wertende = document.cookie.indexOf(";");
      if(Wertende == -1) Wertende = document.cookie.length;
         Wert = document.cookie.substring(Wertstart,Wertende);
      }
      document.getElementById("postIt").firstChild.nodeValue = "-----" + Wert;
      alert(Wert);
}




// --------------------------------------------------- videoplayer
function videoplayer_show(_src, _videotype)
{
    document.getElementById("videolayer").style.display = "block";
    alert("*"+document.getElementById("videoplayer"));
     //alert("*");
    // write embeded object
    
    switch (_videotype)
    {
        case 'flv':
            // document.getElementById("videolayer").firstChild.firstChild.nodeValue = _src;
            // embeded object            
                    
        break;
        
        default:
             document.getElementById("videolayer").firstChild.firstChild.nodeValue = "noneType";
        break;
    }
        //document.embeds["videoplayer"].FlashVars = 'videoIN='+_src;
        //alert(document.embeds["videoplayer"].FlashVars);

}
function videoplayer_hide()
{
    document.getElementById("videolayer").style.display = "none";
}
// form
function checkFormIsEmail(e1){if(!checkEmail(e1.value))	{markAsWrong(e1);}}
function checkEmail (_email){	var _emailOk = false;	var str=_email.toLowerCase();	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;	if (filter.test(str))	{_emailOk = true;}else{		_emailOk = false;}	return _emailOk;}
function markAsWrong (_e1){	_e1.style.backgroundColor = "#ffffb3";	}
// eof
