/*
An alle die hier angelangt sind:
Wenn es Dir Freude macht diese Scripte zu benutzen, dann tu das!!!
Freundlich wäre ein Hinweis wo Du die Scripte gefunden hast, aber in der 
heutigen Welt ist das wohl schon ein wenig zu viel verlangt :-)
*/

// function sponsor(URL) öffnet ein extra Fenster für unsere Sponsoren
function sponsor(URL)	{
   swin=window.open('','','width=500,height=450,top=10,left=10,toolbar,location,status,menubar,scrollbars,resizable');
   swin.window.moveTo(10,10);
   swin.focus();
   swin.location= 'http://'+URL ;
}
// function pop_links() sorgt dafür alle Links aus den Rubriken Flas, Tutorial, etc. in einem extra Browserfenster öffnen
function pop_links(URL){
   pwin=window.open(URL+'&'+Math.random(1),'DETAIL','width=792,height=550,top=10,left=10,scrollbars,resizable,status');
   pwin.window.moveTo(10,10);
   pwin.focus();
}
// function prewiev_swf() sorgt dafür eine Vorschau der SWF Datei zu zeigen
function prewiev_swf(URL){
   swfwin=window.open(URL,'PREWIEV','width=200,height=200,top=10,left=10,resizable,status');
   swfwin.window.moveTo(10,10);
   swfwin.focus();
}
// function browse_s(URL) öffnet die Links in einem extra Fenster (News, Verweise auf andere Seiten etc.)
function browse_s(URL)	{
	win=window.open('','','width=600,height=450,top=10,left=10,scrollbars,resizable,status,toolbar,location,menubar');
	win.window.moveTo(10,10);
	win.focus();
	win.location=(URL.innerHTML.indexOf('http://') == 0)? URL.innerHTML :'http://'+URL.innerHTML;
}
// function browse(URL) öffnet die Links in einem extra Fenster (News, Verweise auf andere Seiten etc.)
function browse(URL)	{
   opti=(URL.innerHTML.indexOf('flashmxpro.com')== -1) ?',status,toolbar,location,menubar' : '';
   win=window.open('','','width=600,height=450,top=10,left=10,scrollbars,resizable'+opti);
   win.window.moveTo(10,10);
   win.focus();
	win.location=(URL.innerHTML.indexOf('http://') == 0)? URL.innerHTML :'http://'+URL.innerHTML;
}


function browse_books(URL){
	win=window.open('','','width=600,height=450,top=10,left=10,scrollbars,resizable,status,toolbar,location,menubar');
	win.window.moveTo(10,10);
	win.focus();
	win.location = 'http://'+URL ;
}
// function browse_links(URL) öffnet die Links in einem extra Fenster (News, Verweise auf andere Seiten etc.)
function browse_links(URL)	{

   win=window.open('','','width=500,height=450,top=10,left=10,toolbar,location,status,menubar,scrollbars,resizable');
   win.window.moveTo(10,10);
   win.focus();
   win.location= 'http://'+URL ;

   
   
   
}

// function an(wo) tauscht die Bilder der Navigationsleiste in blauen Farbton 
function an(wo){
   wo.src=wo.src.replace('.gif','_over.gif');
}
// function aus(wo) tauscht die Bilder der Navigationsleiste in den originalen roten Farbton 
function aus(wo){
    wo.src=wo.src.replace('_over.gif','.gif');
}
// function go_to(loc) verwendet in der Hauptnavigation und ersetzt den regulären Hyperlink
function go_to(loc){
//  alert( ) 
   if(document.all)  {   document.all.inn.src=loc;}
  else                 {   document.getElementById('inn').src=loc;}

}
// function OFF() deaktiviert die entsprechende taus() function
z=-1;
function OFF(z){
   this.z=z;   
}
// function tan(tf) tauscht die Farbe der Navigationsleiste in blauen Farbton 
function tan(tf){
   tf.style.backgroundColor='#b5bbca';
}
// function taus(tf) tauscht die Farbe der Navigationsleiste in den weißen  Farbton 
function taus(tf){
   tf.style.backgroundColor='#ffffff';
}
// function log_in() zeigt den Layer zum Login 
function log_in(y){
   if(document.all){
      document.all.login.style.visibility='visible';
      document.all.login.style.top=y+'px';
   }
   else {
      document.getElementById('login').style.visibility='visible';
      document.getElementById('login').style.top=y+'px';
   }
}
// function log_in() blendet den Layer zum Login aus
function log_hide(){
   if(document.all){
      login.style.visibility='hidden';
   }
   else {
      document.getElementById('login').style.visibility='hidden';
   }
}
//   function is_selected() überprüft ob aus dem PullDown Menü etwas ausgewählt wurde
function  is_selected()  {

   if(document.forms[0].head.value.length < 2 ){
   alert('Fehler:\nBitte gib eine Kurzbeschreibung an... ');
   return false;
   }   
   if(document.forms[0].thema.selectedIndex == 0){
   alert('Fehler:\nBitte wähle eine zugehörige Kategorie... ');
   return false;
   }
      if(document.forms[0].text.value.indexOf('<actionscript>') == -1 || document.forms[0].text.value.indexOf('</actionscript>') == -1){
      if(!confirm('Fehler:\nDein Beitrag enthält nicht die XML Tag\'s <actionscript> und </actionscript>\nFormatierung und Syntaxfärbung sind so unmöglich für andere.\n\nWillst Du es trotzdem senden? ')){
      
         return false;
         }
   }
 
}
// function CHAT(URL) öffnet Eric's Super Chat's
function CHAT(URL)	{
   win=window.open('','','width=800,height=600,top=0,left=0,resizable');
   win.window.moveTo(0,0);
   win.focus();
   win.location= 'http://'+URL;
}
// function SEARCH(Q) öffnet das Suchfenster und beginnt die Suche
function SEARCH(Q)	{
s_string=Q.q.value;
    for(i=1;i<Q.length;i++){
      if(Q.elements[i].checked){
        s_string+='&'+Q.elements[i].name+'='+1; 
      }
      }
  win=window.open('query.php?q='+s_string,'Query','width=395,height=600,top=0,left='+(screen.width-400)+',resizable,scrollbars');
   win.window.moveTo((screen.width-400),0);
   win.focus();

}
// function RESULT() dient dem auf- und zuklappen der Suchergebnisse
var container=new Array();
container['NEWS'] = 1;
container['LINKS']=1;
container['FLAS'] = 1;
container['COMPO']=1;
container['PROTO'] = 1;
container['BOOKS'] = 1;
container['FORUM']=1;
function  RESULT(wer,img)
  {
   if(document.all){
      (container[wer]==0)? document.all[wer].style.height='19px' : document.all[wer].style.height='';
      }
   else {
      (container[wer]==0)? document.getElementById(wer).style.height='19px' : document.getElementById(wer).style.height='';
      }
   (container[wer]==0)?  img.src='../images/arrow_close.gif'  : img.src='../images/arrow_open.gif';
   container[wer]=(container[wer]==0)? 1 :0;
   
  }
  
// function show_form()/ hide_form() zum zeigen des Übermittlungsformulars
function show_form(){

   if(document.all){
   document.all.flashform.innerHTML =  (document.all.flashform.innerHTML == '') ? '<iframe name="hier" src="flash_form.php" width="400" height="170" border="0" frameborder="0"></iframe>' : '';
   }      
   else if(document.getElementById){
   document.getElementById('flashform').innerHTML =(document.getElementById('flashform').innerHTML == '') ? '<iframe name="hier" src="flash_form.php" width="400" height="170" border="0" frameborder="0"></iframe>' : ''; 
   }     
}

function hide_form(){
   if(document.all){
   document.all.flashform.innerHTML = '';
   }   
   else if(document.getElementById){
   document.getElementById('flashform').innerHTML =''
   }
}