/*blick common*/
if(!this.addEvent){
	function addEvent(elm, evType, fn, useCapture) {
		if (elm.addEventListener) {
			elm.addEventListener(evType, fn, useCapture);
			return true;
		}
		else if (elm.attachEvent) {
			var r = elm.attachEvent('on' + evType, fn);
			return r;
		}
		else {
			elm['on' + evType] = fn;
		}
	}
}
if(!this.$){
	function $() {
		var elements = new Array();
		for (var i = 0; i < arguments.length; i++) {
			var element = arguments[i];
			if (typeof element == 'string')
				element = document.getElementById(element);
			if (arguments.length == 1)
				return element;
			elements.push(element);
		}
		return elements;
	}
}
Function.prototype.bind = function (obj) {
	var fn = this;
	return function () {
	var args = [this];
	for (var i = 0, ix = arguments.length; i < ix; i++) {
		args.push(arguments[i]);
	}
	return fn.apply(obj, args);
	};
};
/*End blick common*/


/* cache backgroundimages in IE */
try
{
  document.execCommand("BackgroundImageCache", false, true);
}
catch(err) {}

function imgswap(from,to) 
{
	if(document.images) 
	{
		document.images[from].src = pics[to].src;
	}
}

/* ----------------- WIDGET DRAG/DROP ----------------- */
 function WidgetDropped( container, item, position )
 {
     var instanceId = item.getAttribute("InstanceId");
     var columnNo = parseInt(container.getAttribute("columnNo"));
     var row = position;
     if(item.getAttribute("IsTemplate") != null && item.getAttribute("IsTemplate") == "true")
     {
       var pageId = container.getAttribute("PageId");
       //alert("widget dropped callback -> col:"+ columnNo +", page:" + pageId+", inst:"+instanceId);
       WidgetService.AddWidgetInstance(instanceId, pageId, columnNo, row);
        var ctrlName = ''
         try{
            ctrlName = container.childNodes[0].id;
            if(!ctrlName)
            {
             ctrlName =container.childNodes[1].id;
            }
            if(!ctrlName)
            {
             ctrlName =container.childNodes[2].id;
            }
            __doPostBack(ctrlName.replace(/_/g,'$'),'');
         }
         catch(Err)
         {
         }
     }
     else
     {
       WidgetService.MoveWidgetInstance( instanceId, columnNo, row );
     }
 }

function onDrop( sender, e )
{
    var container = e.get_container();
    var item = e.get_droppedItem();
    var position = e.get_position();
    
    //alert( String.format( "Container: {0}, Item: {1}, Position: {2}", container.id, item.id, position ) );
    
    var instanceId = item.getAttribute("InstanceId");
    var columnNo = parseInt(container.getAttribute("columnNo"));
    var row = position;
     if(item.getAttribute("IsTemplate") != null && item.getAttribute("IsTemplate") == "true")
     {
       var pageId = container.getAttribute("PageId");
       //alert("widget dropped callback -> col:"+ columnNo +", page:" + pageId+", inst:"+instanceId);
       WidgetService.AddWidgetInstance(instanceId, pageId, columnNo, row);
        var ctrlName = ''
         try{
            ctrlName = container.childNodes[0].id;
            if(!ctrlName)
            {
             ctrlName =container.childNodes[1].id;
            }
            if(!ctrlName)
            {
             ctrlName =container.childNodes[2].id;
            }
            __doPostBack(ctrlName.replace(/_/g,'$'),'');
         }
         catch(Err)
         {
         }
     }
     else
     {
       WidgetService.MoveWidgetInstance( instanceId, columnNo, row );
     }
}

function $hide(id)
{
  document.getElementById(id).style.display="none";
}

function dump(arr,level) {
	var dumped_text = "";
	if(!level) level = 0;
	
	//The padding given at the beginning of the line.
	var level_padding = "";
	for(var j=0;j<level+1;j++) level_padding += "    ";
	
	if(typeof(arr) == 'object') { //Array/Hashes/Objects 
		for(var item in arr) {
			var value = arr[item];
			
			if(typeof(value) == 'object') { //If it is an array,
				dumped_text += level_padding + "'" + item + "' ...\n";
				dumped_text += dump(value,level+1);
			} else {
				dumped_text += level_padding + "'" + item + "' => \"" + value + "\"\n";
			}
		}
	} else { //Stings/Chars/Numbers etc.
		dumped_text = "===>"+arr+"<===("+typeof(arr)+")";
	}
	return dumped_text;
}

/* ----------------- Handle Flash Video Visibility ----------------- */
var VideoDiv;
function DisableVideoDiv()
{
  if(VideoDiv != undefined){
      VideoDiv.style.visibility = 'hidden';
      VideoDiv.style.display = 'none';
  }
}
function EnableVideoDiv()
{
  if(VideoDiv != 'undefined'){
      VideoDiv.style.visibility = 'visible';
      VideoDiv.style.display = 'inline';
  }
}

/* ----------------- handle ENTER keys ----------------- */
function DoPostbackOnEnterKey(e, postbackId)
{
  if(!e) var e = window.event;
  if (e.keyCode) code = e.keyCode;
  else if (e.which) code = e.which;
  if(parseInt(code) == 13)
  {
    __doPostBack(postbackId, '');
    return false;
  }
}

function DoLoginOnEnterKey(e, postbackId)
{
  if(!e) var e = window.event;
  if (e.keyCode) code = e.keyCode;
  else if (e.which) code = e.which;
  if(parseInt(code) == 13)
  {
    if(document.getElementById('SecXmlToken') != null)
    {
      RemoveNodeByID('SecXmlToken');
    }
    __doPostBack(postbackId, '');
    return false;
  }
}

function HitTagFilter(e)
{
  if(!e) var e = window.event;
  if (e.keyCode) code = e.keyCode;
  else if (e.which) code = e.which;
  if(parseInt(code) == 13)
  {
		var obj = document.getElementById('txtTag');
		var hrf = document.getElementById('href1');
		window.location.href = hrf.href + '?mtag=' + obj.value;
		return true;
  }
}

function RemoveNodeByID(nodeID)
{
   var node = document.getElementById(nodeID);
   if(node != null && node.parentNode != null)
   {
      node.parentNode.removeChild(node);
   }
}

function SelectAll(checkbox, childName)
{
  if (checkbox.checked == true)
  {
    var i;
    for (i=0; i < document.forms[0].elements.length; i++)
      if ((document.forms[0].elements[i].type == 'checkbox') && (document.forms[0].elements[i].name.indexOf(childName) > -1))
        document.forms[0].elements[i].checked = true;
  }
  else
  {
    var i;
    for (i=0; i < document.forms[0].elements.length; i++)
      if ((document.forms[0].elements[i].type == 'checkbox') && (document.forms[0].elements[i].name.indexOf(childName) > -1))
        document.forms[0].elements[i].checked = false;
  }
}

function stopPropagation(e)
{
   e.cancelBubble = true;
   if (e.stopPropagation)
   {
       e.stopPropagation();
   }
}

function setComboboxText(id)
{
   var combobox = document.getElementById(id+"_Input");
   combobox.value = "";
   var checkboxIndex = 0;
   do
   {
      var checkbox = document.getElementById(id+"_i"+checkboxIndex+"_CheckBox");
      checkboxIndex++;
      if(checkbox != null)
      {
        if(checkbox.checked)
        {
          combobox.value += checkbox.nextSibling.firstChild.nodeValue+",";
        } 
      }
   }while(checkbox != null)
   combobox.value = combobox.value.replace(/,$/, "");
}

function ReloadPageWithTheme(theme)
{
   var urlParts = window.location.href.split("?");
   if(urlParts.length == 2)
   {
      var queryStringParts = urlParts[1].split("&");
      var url = urlParts[0];
      var queryString = "";
      for(var i=0; i<queryStringParts.length; i++)
      {
         if(queryStringParts[i].indexOf("Theme") != 0)
         {
            queryString += queryStringParts[i] + "&";
         }
      }
      window.location.href = url + "?" + queryString + "Theme=" + theme.value;
   }
}

function StyleSwitchMode(previewElementID, rbNewID, rbColorID, rbImageID, tbColorID, tbImageID, pnlColorolorID, pnlImagemageID, cbRepeatHID, cbRepeatVID)
{
   var previewElement = document.getElementById(previewElementID);
   var rbColor = document.getElementById(rbColorID);
   var rbImage = document.getElementById(rbImageID);
   var tbColor = document.getElementById(tbColorID);
   var tbImage = document.getElementById(tbImageID);
   var pnlColor = document.getElementById(pnlColorolorID);
   var pnlImage = document.getElementById(pnlImagemageID);

   previewElement.style.backgroundImage = "none";
   previewElement.style.backgroundRepeat = "no-repeat";
   previewElement.style.backgroundColor = "transparent";

   if(rbNewID == rbColorID) // Switch to color mode
   {
      pnlColor.style.display = "inline";
      pnlImage.style.display = "none";
   
      if(tbColor.value.indexOf('#') != 0) //Somehow this doesn't work!! :-0
       {
       try{
         previewElement.style.backgroundColor = tbColor.value;
         }
        catch (error){
        }
      }
   }
   else // Switch to image mode
   {
      pnlImage.style.display = "inline";
      pnlColor.style.display = "none";
   
      var imgUrlLarge = tbImage.value.toLowerCase();
      imgUrlLarge = imgUrlLarge.replace(/_thumb/, "");
      previewElement.style.backgroundImage = "url(" + imgUrlLarge + ")";
      StyleSetRepeating(previewElementID, cbRepeatHID, cbRepeatVID);
   }
}

function StyleColorChange(previewElementID, colorBoxID, tbColorID)
{
   var previewElement = document.getElementById(previewElementID);
   var colorBox = document.getElementById(colorBoxID);
   var tbColor = document.getElementById(tbColorID);
  
   try
   {
      previewElement.style.backgroundColor = tbColor.value;
      colorBox.style.backgroundColor = tbColor.value;
   }
   catch(error)
   {
      previewElement.style.backgroundColor = "transparent";
      colorBox.style.backgroundColor = "transparent";
      tbColor.value = "Keine Farbe ausgewählt";
   }
}

function StyleSetRepeating(previewElementID, cbRepeatHID, cbRepeatVID)
{
   var previewElement = document.getElementById(previewElementID);
   var cbRepeatH = document.getElementById(cbRepeatHID);
   var cbRepeatV = document.getElementById(cbRepeatVID);
   
   previewElement.style.backgroundRepeat = "no-repeat";
   if(cbRepeatH.checked)
      previewElement.style.backgroundRepeat = "repeat-x";
   if(cbRepeatV.checked)
      previewElement.style.backgroundRepeat = "repeat-y";
   if(cbRepeatH.checked && cbRepeatV.checked)
      previewElement.style.backgroundRepeat = "repeat";
}

function StyleSetFooterHeight(previewElementID, tbFooterHeightID)
{
   var previewElement = document.getElementById(previewElementID);
   var tbFooterHeight = document.getElementById(tbFooterHeightID);
   var validChars = "0123456789";
   var isNumber = true;
   var character;
 
   for (var i=0; i < tbFooterHeight.value.length && isNumber == true; i++)
   {
      character = tbFooterHeight.value.charAt(i);
      if (validChars.indexOf(character) == -1)
      {
         isNumber = false;
      }
   }
   if(isNumber)
   {
      if(tbFooterHeight.value > 500)
         tbFooterHeight.value = 500;
      previewElement.style.height = tbFooterHeight.value + "px";
   }
}

function AttachEvent(parentObject, eventName, eventHandler)
{
  eventName = GetEventName(eventName);
  if(parentObject.addEventListener)
  {
    parentObject.addEventListener(eventName, eventHandler, false);
  }
  else
  {
    if(parentObject.attachEvent)
    {
      parentObject.attachEvent(eventName, eventHandler);
    }
  }
}

function DetachEvent(parentObject,eventName,eventHandler)
{
  eventName = GetEventName(eventName);
  if(parentObject.addEventListener)
  {
    parentObject.removeEventListener(eventName, eventHandler,false);
  }
  else
  {
    if(parentObject.detachEvent)
    {
      parentObject.detachEvent(eventName, eventHandler);
    }
  }
}

function GetEventName(eventName)
{
  eventName=eventName.toLowerCase();
  if(document.addEventListener)
  {
    if(0 == eventName.indexOf('on'))
    {
      return eventName.substr(2);
    }
    else
    {
      return eventName;
    }
  }
  else
  {
    if(document.attachEvent && !(0 == eventName.indexOf('on')))
    {
      return 'on'+eventName;
    }
    else
    {
      return eventName;
    }
  }
}

function GetModalOverlayImage()
{
  var imageElement = document.createElement('IMG');
  imageElement.src= VRoot+'/Library/Images/transp.gif';
  imageElement.style.position='absolute';
  imageElement.style.zIndex = '5000';
  imageElement.className='RadWModalImage';
  return imageElement;
}

function SetModalBackgroundSize(imageElement)
{
  var _3 = (document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);
  var _4 = (document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);
  var _5;
  if(window.innerWidth)
  {
    _5 = Math.min(window.innerWidth,document.documentElement.clientWidth);
  }
  else
  {
    _5 = Math.max(document.body.clientWidth,document.documentElement.clientWidth);
  }
  var _6;
  if(window.innerHeight)
  {
    _6 = Math.max(window.innerHeight,document.documentElement.clientHeight);
  }
  else
  {
    if(document.documentElement.clientHeight>0)
    {
      _6 = document.documentElement.clientHeight;
    }
    else
    {
      _6 = document.body.clientHeight;
    }
  }
  imageElement.style.left = _3+'px';
  imageElement.style.top = _4+'px';
  imageElement.style.width = _5+'px';
  imageElement.style.height = _6+'px';
  imageElement.style.display = '';
}

var modalBackgroundImage = null;

function SetModalBackground()
{
  if(modalBackgroundImage == null)
  {
    modalBackgroundImage = GetModalOverlayImage();
    AttachEvent(window, 'resize', SetModalBackground);
    AttachEvent(window, 'scroll', SetModalBackground);
  }
  
  SetModalBackgroundSize(modalBackgroundImage);
  
  if(null != document.readyState)
  {
    if('complete' == document.readyState)
      document.body.appendChild(modalBackgroundImage);
    else
      window.setTimeout(SetModalBackground, 100);
  }
  else
  {
    document.body.appendChild(modalBackgroundImage);
  }
}

function HideModalBackground()
{
  if(modalBackgroundImage != null)
  {
    modalBackgroundImage.style.display = 'none';
    DetachEvent(window, 'resize', SetModalBackground);
    DetachEvent(window, 'scroll', SetModalBackground);
  }
}

var popupWindowDiv = null;
var popupElementId = null;
var popupWidth = null;
var popupLeft = null;
var popupTop = null;
var popupTitle = null;
var popupContent = null;
var popupIsModal = null;

function SetPopupWindow(elementId, width, left, top, title, content, isModal)
{
   popupElementId = elementId;
   popupWidth = width;
   popupLeft = left;
   popupTop = top;
   popupTitle = title;
   popupContent = content;
   popupIsModal = isModal;
   SetPopupWindowReady();
}

function SetPopupWindowReady()
{
  popupContent = popupContent.replace(/&lt;/g, "<");
  popupContent = popupContent.replace(/&gt;/g, ">");
  
  if(popupWindowDiv == null)
  {
     popupWindowDiv = document.createElement('DIV');
     popupWindowDiv.style.position = 'absolute';
     popupWindowDiv.style.zIndex = '10000';
     popupWindowDiv.style.top = popupTop + 'px';
     var innerWidth;
     if(window.innerWidth)
       innerWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);
     else
       innerWidth = Math.max(document.body.clientWidth, document.documentElement.clientWidth);
     if(popupLeft == null || popupLeft == 0)
       popupWindowDiv.style.left = (innerWidth/2 - popupWidth/2) + 'px';
     else
       popupWindowDiv.style.left = popupLeft + 'px';
  }
  
  popupWindowDiv.style.display = '';
  popupWindowDiv.innerHTML = "<div style='position:absolute; z-index:10000;' unselectable='on' class='radtooltip_Web20' id='"+popupElementId+"'><table class='ToolTipWrapper' width='"+popupWidth+"'><tbody><tr><td class='ToolTipTopLeft'>&nbsp;</td><td class='ToolTipTopCenter'><div class='ToolTipTitlebar VisibleTitlebar'>"+popupTitle+"</div><a title='Schliessen' class='CloseButton' onClick=\"HidePopupWindow('"+popupElementId+"')\" href='javascript:void(0);'><span>Close</span></a></td></td><td class='ToolTipTopRight'>&nbsp;</td></tr><tr><td class='ToolTipLeftMiddle'>&nbsp;</td><td class='ToolTipContent' valign='top'><div>"+popupContent+"</div></td><td class='ToolTipRightMiddle'>&nbsp;</td></tr><tr><td class='ToolTipBottomLeft'>&nbsp;</td><td class='ToolTipBottomCenter'>&nbsp;</td><td class='ToolTipBottomRight'>&nbsp;</td></tr></tbody></table></div>";
  
  if(document.readyState != null && navigator.userAgent != null && navigator.userAgent.toString().indexOf("MSIE") != -1)
  {
    if('complete' == document.readyState)
    {
      document.body.appendChild(popupWindowDiv);
    }
    else
    {
      window.setTimeout(SetPopupWindowReady, 100);
    }
  }
  else
  {
    document.body.appendChild(popupWindowDiv);
  }
  
  if(popupIsModal)
    SetModalBackground();
}

function HidePopupWindow(elementId)
{
  document.getElementById(elementId).style.display = 'none';
  HideModalBackground();
}

function GetRadWindow()
{
  var oWindow = null;
  if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
  else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz az well)      
  return oWindow;
}

function CloseWindow(CWParams)
{
  if(CWParams == 'undefined' || CWParams == null)
  {
    GetRadWindow().Close();          
  }
  else
  {
    GetRadWindow().Close(CWParams);
  }
}

function RefreshParentPage()
{
  GetRadWindow().BrowserWindow.location.href = GetRadWindow().BrowserWindow.location.href;
}

function RedirectParentPage(newUrl)
{
   GetRadWindow().BrowserWindow.document.location.href = newUrl;
}
     
function CallFunctionOnParentPage(fnName)
{
   var oWindow = GetRadWindow();
   if (oWindow.BrowserWindow[fnName] && typeof(oWindow.BrowserWindow[fnName]) == "function")
   {
     oWindow.BrowserWindow[fnName](oWindow);
   }
}

function radWinOpen(url, title, width, height, isCentered, CallBackFunc)
{
   var oWindow; 
   var winW = 600;
   var winH = 400;
   height = height + 50;
   if (parseInt(navigator.appVersion)>3) 
   {
       if (navigator.appName=="Netscape") 
       {
           winW = window.innerWidth-16;
           winH = window.innerHeight-16;
       }
       if (navigator.appName.indexOf("Microsoft")!=-1) 
       {
           winW = document.body.offsetWidth-20;
           winH = document.body.offsetHeight + 20;
       }
   }
   
    var scrollTop = document.body.scrollTop;
    if (scrollTop == 0)
    {
      if (window.pageYOffset)
        scrollTop = window.pageYOffset;
      else
        scrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
   }
   
   oWindow = window.radopen(url, null);
   oWindow.SetSize(width, height);
   oWindow.SetTitle(title); // Doesn't work in safari
   //oWindow.get_ContentFrame().contentWindow.document.title = title;
   oWindow.Center();
   oWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Resize +Telerik.Web.UI.WindowBehaviors.Close);
   
   if(CallBackFunc != 'undefined' && CallBackFunc != null)
   {
      oWindow.set_clientCallBackFunction(CallBackFunc);
   }
}

/* deprecated */
function doopen(wtype, urlvroot, wintitle, urlparams, winWidth, winHeight, isCentered)
{
   var _vroot ='';
   var _params='';
   var _wintitle='';
   var url = "";
   var title = "";
   var width = 600;
   var height = 400;
   var oWindow;
   if(urlvroot != 'undefided' && urlvroot != null)
   {
      _vroot = urlvroot;
   }
   if(urlparams != 'undefided' && urlparams != null)
   {
      _params = urlparams;
   }
   if(wintitle != 'undefided' && wintitle != null)
   {
      _wintitle = wintitle;
   }
   
   if (parseInt(navigator.appVersion)>3) 
   {
       if (navigator.appName=="Netscape") 
       {
           winW = window.innerWidth-16;
           winH = window.innerHeight-16;
       }
       if (navigator.appName.indexOf("Microsoft")!=-1) 
       {
           winW = document.body.offsetWidth-20;
           winH = document.body.offsetHeight+20;
       }
   }
   
    var scrollTop = document.body.scrollTop;
    if (scrollTop == 0)
    {
      if (window.pageYOffset)
        scrollTop = window.pageYOffset;
      else
        scrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
    }

   if (wtype == 1)
   {
      /* ---------- WIZARD WINDOW "CREATE COMMUNITY" ------------ */
      url = _vroot +"/Pages/popups/CreateCommunity.aspx" + _params;
      title = "Gr&uuml;nde Deine eigene Community...";
      width = 800;
      height = 550;
      oWindow = window.radopen(url, null);
      oWindow.SetSize(width, height);
      oWindow.SetTitle(title);
      oWindow.Center();
   }
   else if (wtype == 2)
   {
      /* ---------- WIZARD WINDOW "Das aktuellste Bild" ------------ */
      url = _vroot +"/Pages/popups/WidgetEdit.aspx" + _params;
      title =  _wintitle;
      width = 700;
      height = 620;
      try
      {
         oWindow = window.radopen(url, null);
         oWindow.SetSize(width, height);
         oWindow.SetTitle(title);
         oWindow.Center();
      }
      catch(Err)
      {
      }
   }
   else if (wtype == 3)
   {
      /* ---------- WIZARD WINDOW "REGISTER ------------ */
      url = _vroot +"/Pages/Other/registration.aspx" + _params;
      title = "csbooster.baa Registration...";
      width = 800;
      height = 550;
      oWindow = window.radopen(url, null);
      oWindow.SetSize(width, height);
      oWindow.SetTitle(title);
      oWindow.Center();
   }
   else if (wtype == 4)
   {
      /* ---------- WIZARD WINDOW "Das aktuellste Bild" ------------ */
      url = _vroot +"/Pages/popups/" + _params;
      title =  _wintitle;
      width = 800;
      height = 550;
      try
      {
         oWindow = window.radopen(url, null);
         oWindow.SetSize(width, height);
         oWindow.SetTitle(title);
         oWindow.Center();
      }
      catch(Err)
      {
      }
   }
   else if (wtype == 5)
   {
      /* ---------- Message Window ------------ */
      url = _vroot +"/Pages/popups/" + _params;
      title = _wintitle;
      width = 700;
      height = 580;
      try
      {
         oWindow = window.radopen(url, null);
         oWindow.SetSize(width, height);
         oWindow.SetTitle(title);
         oWindow.Center();
      }
      catch(Err)
      {
      }
   }
   else if (wtype == 6)
   {
      /* ---------- Message Window ------------ */
      url = _vroot +"/Pages/popups/SinglePictureUpload.aspx?" + _params;
      title = _wintitle;
      width = 600;
      height = 500;
      try
      {
         oWindow = window.radopen(url, null);
         oWindow.SetSize(width, height);
         oWindow.SetTitle(title);
         oWindow.Center();
      }
      catch(Err)
      {
      }
   }
   else if (wtype == 7)
   {
      /* ---------- password recover ------------ */
      url = _vroot + "/Pages/Other/passwordrecover.aspx";
      title = _wintitle;
      width = 500;
      height = 350;
      try
      {
         oWindow = window.radopen(url, null);
         oWindow.SetSize(width, height);
         oWindow.SetTitle(title);
         oWindow.Center();
      }
      catch(Err)
      {
      }
   }
   else if (wtype == 8)
   {
      /* ---------- send messages ------------ */
      url = _vroot +"/Pages/popups/" + _params;
      title = _wintitle;
      width = 640;
      height = 550;
      try
      {
         oWindow = window.radopen(url, null);
         oWindow.SetSize(width, height);
         oWindow.SetTitle(title);
         oWindow.Center();
      }
      catch(Err)
      {
      }
   }
   else if (wtype == 9)
   {
      /* ---------- Merken Window ------------ */
      url = _vroot +"/Pages/popups/" + _params;
      title = _wintitle;
      width = 450;
      height = 330;
      try
      {
         oWindow = window.radopen(url, null);
         oWindow.SetSize(width, height);
         oWindow.SetTitle(title);
         oWindow.Center();
      }
      catch(Err)
      {
      }
   }
   else if (wtype == 10)
   {
      /* ---------- the CMS conent Window ------------ */
      url = _vroot +"/Pages/Popups/UploadHtmlContent.aspx?" + _params;
      title = _wintitle;
      width = 720;
      height = 560;
      try
      {
         oWindow = window.radopen(url, null);
         oWindow.SetSize(width, height);
         oWindow.SetTitle(title);
         oWindow.Center();
      }
      catch(Err)
      {
      }
   }
   else if (wtype == 11)
   {
      /* ---------- Kontaktieren Window ------------ */
      url = _vroot +"/Pages/popups/" + _params;
      title = _wintitle;
      width = 400;
      height = 350;
      try
      {
         oWindow = window.radopen(url, null);
         oWindow.SetSize(width, height);
         oWindow.SetTitle(title);
         oWindow.Center();
      }
      catch(Err)
      {
      }
   }
   else if(winWidth && winHeight)
   {
      oWindow = window.radopen(_vroot +"/Pages/popups/" + _params, null);
      oWindow.SetSize(winWidth, winHeight);
      oWindow.SetTitle(title);
      oWindow.Center();
   }
}
