function SetInnerLink()
{
	// run only on Windows
	if ((navigator.appVersion.indexOf("Win")!=-1)&&(navigator.appVersion.indexOf("MSIE")!=-1))
		window.location.href='#element';
	
}
	

function AddAnchor(name,place,delta){

	var theform;

	if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
		theform =document.forms["DefaultDesktop"];
	}
	else {
		theform = document.DefaultDesktop;
	}

	maxAnchor=-1
	anchors=document.anchors
	for (i=0;i<anchors.length;i++) {
		if (anchors[i].name.substring(0,name.length)==name) {maxAnchor++;}
	}
	maxAnchor+=delta
	if (maxAnchor>-1) {
		if (place<0) {place=0;}
		else if (place>maxAnchor) {place=maxAnchor;}
		theform.action+="#"+name+place;
	}
}

function ModHelp() {
	msgWindow=window.open("Admin/module_help.aspx","_blank","top=0,left=0,width=300,height=500,menubar=no,location=no,toolbar=no,directories=no,status=no,resizable=yes,scrollbars=yes");
}
function BrowseMenu(ModuleListID,ModuleID,ModuleName,ModuleMenuIDContent,ModuleMenuNameContent,ChkClone,PortalID,width,height){
	//If ModuleID and ModuleName are set, ModuleListID ist not used
	var ModuleListIDobj;
	var iModuleID;
	var sModuleName;
	
	
	if(ModuleName!=null && ModuleID!=null)
	{
		iModuleID=ModuleID;
		sModuleName=ModuleName
	}
	else
	{
		ModuleListIDobj=GetObject(document.forms[0],ModuleListID);
		iModuleID=ModuleListIDobj.options[ModuleListIDobj.selectedIndex].value;
		sModuleName=ModuleListIDobj.options[ModuleListIDobj.selectedIndex].text;
	}
	msgWindow=window.open("Admin/BrowseMenuForModules.aspx?ModuleID="+iModuleID + "&ModuleMenuIDContent=" + ModuleMenuIDContent + "&ModuleMenuNameContent=" + ModuleMenuNameContent + "&PortalID="+PortalID + "&ModuleName=" + sModuleName +"&ChkClone="+ChkClone,"_blank","top=0,left=0,width="+width+",height="+height+",menubar=no,location=no,toolbar=no,directories=no,status=yes,resizable=yes,scrollbars=yes");
}
function RemoveCopyContent(ModuleMenuIDContent,ModuleMenuNameContent,ChkClone)
{
	this.document.getElementById(ModuleMenuIDContent).value='-1';
	this.document.getElementById(ModuleMenuNameContent).innerHTML='-';
	this.document.getElementById(ChkClone).checked=true;
	this.document.getElementById(ChkClone).checked=false;
	
}
function GetObject(form,name){
	for(i=0;i<form.elements.length;i++){
		if(form.elements[i].name==name){
				return form.elements[i];
		}
	}
}



//BLINKING


window.onerror = null;
 var bName = navigator.appName;
 var bVer = parseInt(navigator.appVersion);
 var NS4 = (bName == "Netscape" && bVer >= 4);
 var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
 var NS3 = (bName == "Netscape" && bVer < 4);
 var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);
 var blink_speed=1000;
 var i=0;
 
if (NS4 || IE4) {
 if (navigator.appName == "Netscape") {
 layerStyleRef="layer.";
 layerRef="document.layers";
 styleSwitch="";
 }else{
 layerStyleRef="layer.style.";
 layerRef="document.all";
 styleSwitch=".style";
 }
}


function Blink(layerName){
 if (NS4 || IE4) { 
 if(i%2==0)
 {
 eval('document.getElementById("'+layerName+'")'+ styleSwitch+'.visibility="visible"');
 //eval(layerRef+'["'+layerName+'"]'+ styleSwitch+'.visibility="visible"');
 }
 else
 {
  eval('document.getElementById("'+layerName+'")'+ styleSwitch+'.visibility="hidden"');
 //eval(layerRef+'["'+layerName+'"]'+ styleSwitch+'.visibility="hidden"');
 }
 } 
 if(i<1)
 {
 i++;
 } 
 else
 {
 i--;
 }
 setTimeout("Blink('"+layerName+"')",blink_speed);
}
 

