iIntID					= null;
iIntNewsRefresher		= null;

//document.onmousedown	= rechtsklick;

//alert(document.referrer);

//welcome();

/////////////////////////////////////////////////////////////////////////////////
function welcome()
/////////////////////////////////////////////////////////////////////////////////
{
	alert('welcome');
}//end of func


/////////////////////////////////////////////////////////////////////////////////
function init()
/////////////////////////////////////////////////////////////////////////////////
{
	//if (document.getElementById("LiveClock")) 	{show_LiveClock();}
	if (document.getElementById("suckertree1")) 	{buildsubmenus();}
	
	
}//end of func

/////////////////////////////////////////////////////////////////////////////////
function login()
/////////////////////////////////////////////////////////////////////////////////
{
	if (window.document.form_register.testlogin.selectedIndex > 1)
	{
		window.document.form_register.email.value 	= window.document.form_register.testlogin.options[window.document.form_register.testlogin.selectedIndex].text;
		window.document.form_register.pwd.value 	= window.document.form_register.testlogin.options[window.document.form_register.testlogin.selectedIndex].value;
	}//endif
}//end of func

/////////////////////////////////////////////////////////////////////////////////
function open_tool()
/////////////////////////////////////////////////////////////////////////////////
{
	if (window.document.naviform.thisTool.selectedIndex > 1)
	{
		thisUrl = window.document.naviform.thisTool.options[window.document.naviform.thisTool.selectedIndex].value;
		openWIN(thisUrl,800,600);
	}//endif
}//end of func


/////////////////////////////////////////////////////////////////////////////////
function doPause(ms) 
/////////////////////////////////////////////////////////////////////////////////
{
	var date = new Date();
	var curDate = null;
	
	do { curDate = new Date(); } 
	while(curDate-date < ms);
}//end of func


/////////////////////////////////////////////////////////////////////////////////
function change_class(elementID,newClass) 
/////////////////////////////////////////////////////////////////////////////////
{
	document.getElementById(elementID).className = newClass;

}//end of func

/////////////////////////////////////////////////////////////////////////////////
function changePublishStatus()
/////////////////////////////////////////////////////////////////////////////////
{
	if (document.sendForm.publishStatus.value == 1) 
			{document.sendForm.publishStatus.value = 0;} 
	else	{document.sendForm.publishStatus.value = 1;} 

	document.getElementById("publishStatusPic").className = "publishStatusPic" + document.sendForm.publishStatus.value;

}//end of func

/////////////////////////////////////////////////////////////////////////////////
function changeLangPic(tlang,tmode)
/////////////////////////////////////////////////////////////////////////////////
{
	thisPicID = 'langPic_'+tlang;
	if (tmode==1) {oldClass = document.getElementById(thisPicID).className;document.getElementById(thisPicID).className = 'langPic_active';}
	if (tmode==0) 
		{
			if (tlang != document.sendForm.language.value) {document.getElementById(thisPicID).className = oldClass;}
		}
}//end of func

/////////////////////////////////////////////////////////////////////////////////
function changeLanguage(picID,tlang)
/////////////////////////////////////////////////////////////////////////////////
{
	for (i=1;i<langArr.length;i++) 
	{
		thisPicID = 'langPic_'+langArr[i];
		document.getElementById(thisPicID).className = 'langPic_passive';
	}//endfor
	document.sendForm.language.value = tlang;
	document.getElementById(picID).className = 'langPic_active';	
	
	

}//end of func




/////////////////////////////////////////////////////////////////////////////////
function goto_admin_area()
/////////////////////////////////////////////////////////////////////////////////
{
	if (window.document.adminForm.thisUrl.selectedIndex > 1)
	{
		window.document.adminForm.action = window.document.adminForm.thisUrl.options[window.document.adminForm.thisUrl.selectedIndex].value;
		window.document.adminForm.target = '_adminWIN';
		window.document.adminForm.submit();
	}//endif
}//end of func



function rechtsklick() 
/////////////////////////////////////////////////////////////////////////////////
{
	if (event.button==2) {alert(copyRightStr);}
}//end of func

///////////////////////////////////////////
function openWIN(thisLink,w,h)
///////////////////////////////////////////
{
 winName	= randInt(100) + '_WIN';
 newWIN 	= window.open(thisLink, winName, "width="+w+",height="+h+",scrollbars=1,status=no,status=0");
 newWIN.focus();
}


/////////////////////////////////////////////////////////////////////////////////
function openNewWin(url,w,h,status,scroll,winName) 
/////////////////////////////////////////////////////////////////////////////////      
{
		rndVal	= Math.round(Math.random()*100000000);

        if (!scroll) {scroll="no";}
        if (!status) {status="no";}
        if (!winName){winName = "winName"+rndVal;}
        
        thisWin	= new Object();
        thisWin.url    = url;
        thisWin.width  = w;
        thisWin.height = h;
        thisWin.name   = winName;
        var attr = "status="+status+",scrollbars="+scroll+",resize=yes,width="+thisWin.width+",height="+thisWin.height;
        
        thisWin.win = window.open(thisWin.url, thisWin.name, attr);
}//end of func openWin   


///////////////////////////////////////////
function randInt(max)
///////////////////////////////////////////
{
        var retVal	= 0;
	     var min		= 1;
        var max		= 15;
        
        var div = (max - min) + 1
        var randNum = Math.random()
        for (var i = 0; i <= div - 1; i++)
        {
                if (randNum >= i / div && randNum < (i+1) / div)
                        {retVal =  i + min;}
        }//endfor
        
     return retVal
        
}//end of func



//////////////////////////////////////////////////////////////////
function genRndVal()
//////////////////////////////////////////////////////////////////
{
      var thisVal1 	= '';
      var thisVal2 	= '';
      var thisVal	= '';
      
      for(s=1;s<=2;s++)     
      {
	      f=randInt();
	      for(x = 1;x <= f;x++)     {thisVal1 = thisVal1 + thisChar[x];}
	    }
	    
      for(s=1;s<=2;s++)     
      {
	      f=randInt();
	      for(x = 1;x <= f;x++)     {thisVal2 = thisVal2 + thisChar[x];}
	    }	    

		thisVal = '&'+thisVal1+'='+thisVal2;
	return thisVal;
}//end of func





//////////////////////////////////////////////////////////////////
function genRndCol(tmode)
//////////////////////////////////////////////////////////////////
{
        var r,g,b,rgb;

        r=Math.round(Math.random()*255);
        g=Math.round(Math.random()*255);
        b=Math.round(Math.random()*255);
        rgb="rgb("+r+","+g+","+b+")";

        // als rgb(r,g,b) direkt verwendbar fuer style-Objekt
        
        // RGB-Werte zur Anzeige in Hex-Schreibweise umwandeln
        hex=rgb.substring(4,rgb.length-1);
        hex=hex.split(",");
        hr=parseInt(hex[0]).toString(16).toUpperCase();
        hr=(hr.length==1)?"0"+hr:hr;
        hg=parseInt(hex[1]).toString(16).toUpperCase();
        hg=(hg.length==1)?"0"+hg:hg;
        hb=parseInt(hex[2]).toString(16).toUpperCase();
        hb=(hb.length==1)?"0"+hb:hb;
        hexCol="#"+hr+hg+hb; // #RRGGBB
   
   if (tmode=='rgb')		{retVal = rgb;}
   if (tmode=='hex')		{retVal = hexCol;}   
       
return retVal;
        
}//end of func

/////////////////////////////////////////////////////////////////////////////////
function image_over(thisImage,thisSrc)
/////////////////////////////////////////////////////////////////////////////////
{
	alert(document.thisImage.src);
	document.thisImage.src	= thisSrc;
}//end of func


//////////////////////////////////////////////////////
function refresh_page()
//////////////////////////////////////////////////////
{
	document.location.reload();
}//end of func 


/////////////////////////////////////////////////////////////////////////////////
function set_author()
/////////////////////////////////////////////////////////////////////////////////
{
	if (document.sendForm.authorList.options[document.sendForm.authorList.selectedIndex].value)
				{document.sendForm.author.value = document.sendForm.authorList.options[document.sendForm.authorList.selectedIndex].value;}
}//endof func


/////////////////////////////////////////////////////////////////////////////////
function set_lang()
/////////////////////////////////////////////////////////////////////////////////
{
	if (document.sendForm.langList.options[document.sendForm.langList.selectedIndex].value)
				{document.sendForm.strLang.value = document.sendForm.langList.options[document.sendForm.langList.selectedIndex].value;}
}//endof func



/////////////////////////////////////////////////////////////////////////////////
function confirm_action(thisMsg)
/////////////////////////////////////////////////////////////////////////////////
{
	if (document.sendForm.thisAction.options[document.sendForm.thisAction.selectedIndex].value == 1)
	{
		Check = confirm(thisMsg);
		if (Check == true) {document.sendForm.submit();}
	}
	else {document.sendForm.submit();}

}//end of func




/////////////////////////////////////////////////////////////////////////////////
function start_wysiwyg_editor(fieldNam,thisUrl)
/////////////////////////////////////////////////////////////////////////////////
{
	thisUrl += document.sendForm.txtLong.value;
	//alert(thisUrl);
	openWin(thisUrl,600,450,'yes','no','wysiwyg');
}//end of func



//---------------------------------------------------------------------------------------------------------------------
//======================================================[end of function.js]==========================================
//---------------------------------------------------------------------------------------------------------------------

