
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);



/*  
Author: Pixelwings Medien GmbH
Author URI: http://pixelwings.com/
*/
/*
* HttpRequest START
*/
function HttpRequest(c) {
	if (window.XMLHttpRequest) var req=new XMLHttpRequest();
	else if (window.ActiveXObject) var req=new ActiveXObject("Microsoft.XMLHTTP");

	var res=null;
	
	var parameter='';
	
	if (c.parameter!=undefined) {
		for (var i in c.parameter) {
			var e=c.parameter[i];
			if (e!=null) {
				parameter+=i+'='+encodeURIComponent(e)+'&';
			}
		}
	}
	
	req.open((c.method?c.method:'GET'),c.url,true);
	req.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	req.onreadystatechange=function () {
		if (req.readyState==4) {
			if (req.status==200) {
				res=eval("("+(req.responseText?req.responseText:"{status:'no data'}")+")");
				//if (window.globals.debug) alert(req.responseText);
			}
		}
		else if (req.readyState!=0) res=eval("({status:'loading'})");
		
		if (typeof(window[c.callback])=='function') {
			window[c.callback](res,(c.args?c.args:false));
		}
	};
	req.send(parameter);
}
/*
* HttpRequest STOP
*/
function counter() {
	var i,e,s,o,b;
	e=document.getElementById('cis_counter');
	if (e==undefined) return false;
	window.count=window.count!=undefined?window.count+1:0;
	e.innerHTML='Loading Profiles: '+Math.round(window.count*9.5);
	
	s=Math.round(Math.random()*100)*(Math.round(Math.random()*1000)>500?-1:1);
	s=s>0?s:1;
	s=Math.round(Math.random()*15)+s;
	o=Math.round(window.count*9.5);
	if (o>1200) {
		b=0;
		while (b<5 || b>8) {
			b=Math.round(Math.random()*10);
		}
		if (Math.floor(o/b*100)%2==1) {
			s*=10;
		}
	}
	e.innerHTML='<br />Loading Profiles: '+o;
	setTimeout(counter,s);
}
function getCIS_CONTENT(r) {
	var cis_curl,l;
	cis_curl=document.getElementById('cis_curl');
	if (!cis_curl) return false;
  l=document.getElementById('cis_loading');
	c=document.getElementById('cis_counter');
	
	if (!r) {
  	if (l==undefined)	{
  		l=document.createElement('img');
  		l.setAttribute('id','cis_loading');
  		l.setAttribute('src','/wp/wp-content/themes/cip/images/loading.gif');
  		cis_curl.appendChild(l);
  	}
  	if (c==undefined)	{
  		c=document.createElement('h2');
  		c.setAttribute('id','cis_counter');
  		cis_curl.appendChild(c);
  	}
		HttpRequest({url:'/wp/wp-content/themes/cip/cis_curl/get_content.php',method:'POST',parameter:{},callback:'getCIS_CONTENT',args:{}});
	}
	else {
		if (r.html) {
			if (l!=undefined)	cis_curl.removeChild(l);
			if (c!=undefined)	cis_curl.removeChild(c);
			cis_curl.innerHTML=r.html;
		}
	}
}
function CIS_TICKER_INIT() {
	var ticker_config={
		target:'CIS_TICKER1',
		target_width:250,
		target_height:200,
		obj:'ticker1',
		top:0,
		left:0,
		space:0,
		speed:60,
		wrap:true,
		wrap_at:250,
		prop:'top',
		pause:1,
		content:CIS_TICKER_CONTENT
	};
	window.ticker1=new CIS_TICKER(ticker_config);
}










//-->
