

function innit(myInfo,myMenu,myNo,myType){
         
      if(myNo != ""){
 
            ActionFlashPlayer(myMenu,myNo,myType)
        }else{
            if(myInfo){
                  setTimeout("ActionMinimize(1)",1000);
   
            }else{
            
            
            }
      }
}

var VarLocker=true;
var LockValue=0	
var ScrollAction=0;		
var ActionValue;
var scrollDirGlobal;

var scrollPosTemp=0;

var truc

var scrollPos
var counter=0;
var counterGlobal=0;
var counterTemp=0;
version = navigator.appVersion
sch = screen.availWidth;

var e = window.innerWidth;
var c=navigator.appVersion;
var b=navigator.appName;
var a= document.lastModified;

var carousselCounter=-1;


function dhtml()
{if(version <"4.0")
{window.top.href="dhtml/bund2.html";}
else{if(sch>1023)
{top.window.location.href="dhtml/bund1.html";}
else    {top.window.location="dhtml/bund1a.html";}}}



function fenster(url,name,h,w){
      window.open(url,name,"toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=1,height="+h+",width="+w);
}

function fensterscroll(url,name,h,w){
      window.open(url,name,"toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0,height="+h+",width="+w);
}




$(window).load(function(){

/*
content = document.getElementById("slideContainer");
//alert("?"+content.childNodes.length)
//boxCenterContentTitle

var ArrChildren = new Array();


for (i=0; i<content.childNodes.length; i++) {
      content.childNodes[i]
      if(content.childNodes[i].nodeName=="DIV"){
      ArrChildren.push(i);
      
      content.childNodes[i].style.position="absolute";
      content.childNodes[i].style.left= 0+"px";
      content.childNodes[i].style.width= 300+"px";
      content.childNodes[i].style.visibility = "hidden";
      }
}



$('#next').click(function() {

if(carousselCounter==ArrChildren.length){
      carousselCounter=-1;
}

if(carousselCounter>=0){

$(content.childNodes[ArrChildren[carousselCounter]]).animate({left:-465}, {duration: 1000, easing: 'linear'}).animate({left:100}, {duration: 1000, easing: 'linear'});

      $(content.childNodes[ArrChildren[carousselCounter]]).fadeOut(900);
}
carousselCounter++;



content.childNodes[ArrChildren[carousselCounter]].style.visibility = "visible";
//$(content.childNodes[ArrChildren[carousselCounter]]).animate({left:465}, {duration: 1000, easing: 'easeInOutCirc'}).animate({height:100}, {duration: 1000, easing: 'easeOutBounce'});

$(content.childNodes[ArrChildren[carousselCounter]]).show("slide", { direction: "right" }, 1000);
});


$('#prev').click(function() {

if(carousselCounter==0){
      carousselCounter=ArrChildren.length;
}

if(carousselCounter>=0){
      $(content.childNodes[ArrChildren[carousselCounter]]).fadeIn(400);
}
carousselCounter--;



content.childNodes[ArrChildren[carousselCounter]].style.visibility = "visible";
$(content.childNodes[ArrChildren[carousselCounter]]).show("slide", { direction: "left" }, 1000);
});
*/






      function getScrollY() {
          var scrOfY = 0;
      		if(typeof(window.pageYOffset) == 'number') {
      						//Netscape compliant
      						scrOfY = window.pageYOffset;
      		} else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
      						//DOM compliant
      						scrOfY = document.body.scrollTop;
      		} else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
      						//IE6 standards compliant mode
      						scrOfY = document.documentElement.scrollTop;
      		}
      		return scrOfY;
      }
		

      $(document).mouseup(function(){      //--> if (scroll end testing)
      //showFlyingDIV(1)
      });


      var clearQueue = true; 
      var gotoEnd= true; 

     
      function scrollAction()  {
        counterTemp++;
           $('#debug').html("--"+counterTemp);
         var yoffset = getScrollY();
         
         if(yoffset==scrollPosTemp){
                $('#boxMenuMain')
                .stop(clearQueue,gotoEnd)
                .fadeTo("slow", 1);
               
            
					       ScrollAction=0
                 counter=0
                 clearInterval(truc)
                 counterTemp=0
         }
            scrollPosTemp = yoffset;
      }
      
      
      
    function initAction()  {
          truc = setInterval(scrollAction, 500);
    }

  	$(window).scroll(function(){
          counter++;
          if(counter==1){
              $('#boxMenuMain').fadeTo("fast", 0.3);
              initAction()
          }
				}
      );
	}
  
  			
);



var movie0 = new Array();


movie0[0] = new Object();
movie0[0]["Name"] = "Zeichnen mit Flash";
movie0[0]["Url"] = "flash_draw.swf";
movie0[0]["width"] = 550;
movie0[0]["height"] = 370;
movie0[0]["bgColor"] = "#4F5F5F";


movie0[1] = new Object();
movie0[1]["Name"] = "Flash Diagramme";
movie0[1]["Url"] = "flash_diagrams.swf";
movie0[1]["width"] = 550;
movie0[1]["height"] = 370;
movie0[1]["bgColor"] = "#4F5F5F";

movie0[2] = new Object();
movie0[2]["Name"] = "Skip Intro";
movie0[2]["Url"] = "flash_intro.swf";
movie0[2]["width"] = 550;
movie0[2]["height"] = 370;
movie0[2]["bgColor"] = "#4F5F5F";

movie0[3] = new Object();
movie0[3]["Name"] = "Flash Trailer";
movie0[3]["Url"] = "flash_trailer_band.swf";
movie0[3]["width"] = 550;
movie0[3]["height"] = 370;
movie0[3]["bgColor"] = "#4F5F5F";

movie0[4] = new Object();
movie0[4]["Name"] = "Fiona";
movie0[4]["Url"] = "fiona_kids_calculator.swf";
movie0[4]["width"] = 550;
movie0[4]["height"] = 370;
movie0[4]["bgColor"] = "#4F5F5F";

movie0[5] = new Object();
movie0[5]["Name"] = "Flash Video";
movie0[5]["Url"] = "appVideo.swf?vflv=unico1|unico2|unico3";
movie0[5]["width"] = 420;
movie0[5]["height"] = 260;
movie0[5]["bgColor"] = "#4F5F5F";




var movie1 = new Array();


movie1[0] = new Object();
movie1[0]["Name"] = "Jump and Run";
movie1[0]["Url"] = "flashgame_supermario_clone.swf";
movie1[0]["width"] = 550;
movie1[0]["height"] = 370;
movie1[0]["bgColor"] = "#4F5F5F";


movie1[1] = new Object();
movie1[1]["Name"] = "Pong";
movie1[1]["Url"] = "flashgame_pong.swf";
movie1[1]["width"] = 320;
movie1[1]["height"] = 160;
movie1[1]["bgColor"] = "#4F5F5F";



movie1[2] = new Object();
movie1[2]["Name"] = "Space Invaders Klon";
movie1[2]["Url"] = "flashgame_space_invaders_clone.swf";
movie1[2]["width"] = 550;
movie1[2]["height"] = 370;
movie1[2]["bgColor"] = "#4F5F5F";

movie1[3] = new Object();
movie1[3]["Name"] = "Arcade Shooter";
movie1[3]["Url"] = "flashgame_arcade_shooter.swf";
movie1[3]["width"] = 550;
movie1[3]["height"] = 370;
movie1[3]["bgColor"] = "#4F5F5F";



movie1[4] = new Object();
movie1[4]["Name"] = "Akustisches Memory";
movie1[4]["Url"] = "flashgame_memory.swf";
movie1[4]["width"] = 600;
movie1[4]["height"] = 380;
movie1[4]["bgColor"] = "#4F5F5F";




function ActionFlashPlayer(myMenu,myNo,myType){

if(myType){
      ActionMinimize(1)
      var flashCode;
      var menuCode="";
      var movieName= movie0[myNo]["Name"];
      var loopStart = this["movie"+myMenu].length-1;
for (var i = loopStart; i >= 0; i--) {

if(i==myNo){
menuCode += " <b><a href=\"#\"  class=\"a1\" onclick=\"ActionFlashPlayer("+myMenu+","+i+",1);return false;\">"+this["movie"+myMenu][i]["Name"]+"</a></b><br/>";

}else{
menuCode += " <a href=\"#\"  class=\"a1\" onclick=\"ActionFlashPlayer("+myMenu+","+i+",1);return false;\">"+this["movie"+myMenu][i]["Name"]+"</a><br/>";

}


}

var movieUrl= this["movie"+myMenu][myNo]["Url"];
var movieWidth = this["movie"+myMenu][myNo]["width"];
var movieHeight = this["movie"+myMenu][myNo]["height"];
var movieBgColor = this["movie"+myMenu][myNo]["bgColor"];

//var movieBgColor = "#CBCDCD";
     $('#boxContent').fadeOut(400);
     $('#boxFlashAction').fadeIn(400);
         $('#boxLogoSmall').fadeOut(700);  
     
flashCode = "<div style=\"background-color:"+movieBgColor+";\">";
   flashCode += "<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" WIDTH=\""+movieWidth+"\" HEIGHT=\""+movieHeight+"\" >";
  flashCode += "<PARAM NAME= movie VALUE=\"flash/"+movieUrl+"\">";
    flashCode += "<PARAM NAME=quality VALUE=high><PARAM NAME=scale VALUE=exactfit><param name=\"wmode\" value=\"transparent\"> "; 
    flashCode += "<EMBED src=\"flash/"+movieUrl+"\" quality=high name=datum scale=exactfit wmode=\"transparent\"   WIDTH="+movieWidth+" HEIGHT="+movieHeight+" TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></EMBED>"; 
    flashCode += "</OBJECT>";    
    flashCode += "</div>";   
     flashCode += "<span style=\"font-size:9px;\">direkter Link: <a href=\"http://www.radiocity.ch?v="+myMenu+","+myNo+">http://www.radiocity.ch?v="+myMenu+","+myNo+"</a></span>";    
     
     var VarMovieTop = ((480-movieHeight)/2)-10;
      var VarMovieLeft = (600-movieWidth)/2;

     document.getElementById("boxFlashInnerContent").style.left = VarMovieLeft+"px";    
    document.getElementById("boxFlashInnerContent").style.top =VarMovieTop+"px";
     document.getElementById("boxFlashInnerContent").style.width =movieWidth+"px";
     document.getElementById("boxFlashInnerContent").innerHTML=flashCode;
     document.getElementById("boxFlashMenu").innerHTML=menuCode;
  
     }else{
 ActionMinimize(0)

     $('#boxFlashAction').fadeOut(400);
     $('#boxContent').fadeIn(400);  
    $('#boxLogoSmall').fadeIn(700);  
     
       
     
     }
     
     
     
}


function fader(){
     $('#boxMenuMain').fadeTo("slow", 0.5);
}


function ActionMinimizeOver(myType){

if(myType==0){

 document.getElementById("boxMenuMain").style.backgroundColor="#C2C2CE";
}else{
 document.getElementById("boxMenuMain").style.backgroundColor="#DADADC";

}



}










function starter(){

//setTimeout("ActionMinimize(1)",2000)

}


function createRequestObject() {
    var ro;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer") {
        ro = new ActiveXObject("Microsoft.XMLHTTP");
    } else {
        ro = new XMLHttpRequest();
    }
    return ro;
}

var http = createRequestObject();
var DivOut;


function ActionMinimize(myType){
      DivOut = "boxSession";
  
      if(myType){
          $('#MenuControls').fadeOut(200);
                $('#boxMenuMain').animate({left:-165});
          
                $('#boxMinimizedMain').fadeIn(400);
                 
      }else{
                    
            $('#boxMenuMain').animate({left:10});
                $('#boxMinimizedMain').fadeOut(400);
                    $('#MenuControls').fadeIn(1600);
      }

      http.open('POST','ajax/AjaxSession.php');
      http.onreadystatechange = handleResponse;
      http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
      http.send('AjVal=jdfeiUU56e3reww&AjType='+myType);

}




function  handleResponse() {
    if(http.readyState == 4){
        var response = http.responseText;
//alert(http.getAllResponseHeaders()  )  
        var update = new Array();
        if(response.indexOf('|' != -1)) {
            update = response.split('|');

}

document.getElementById(DivOut).innerHTML = response; 

}

}













