// JavaScript Document


function openVorstand(url) {
	// default
	window.open(url,'','scrollbars=no,width=480,height=480');
}

function openNewsletter() {

	// default

	window.open('http://newsletter.c-quadrat.at/newsletter/newsletter.php','','scrollbars=yes,width=640,height=480');

}
var CQ=new Object();
	CQ.PopUpWindow=new Object();
		CQ.PopUpWindow.Open=function(winUrl,winName,winFeatures){
			try{
				var oWindow = window.open( '',winName, winFeatures, true ) ;
				if ( !oWindow ){
					alert('Bitte schalten Sie den Popupblocker aus, um fortzufahren!');
					return ;
				}
				oWindow.focus() ;
				oWindow.location.href = winUrl ;
				oWindow.opener=self;
				oWindow.creator=self;
			}catch(ex){
				alert('Bitte schalten Sie den Popupblocker aus, um fortzufahren!');
			}
		}

	CQ.home=new Object();
		CQ.home.loadInit=function(){
			CQ.home.resizeHomeCotent();
		}
		CQ.home.resizeInit=function(){
			CQ.home.resizeHomeCotent();
		}
		CQ.home.resizeHomeCotent=function(){
			var winWidth=document.documentElement.clientWidth;
			var winHeight=document.documentElement.clientHeight;
			var cntWidth=document.getElementById("dvContent").offsetWidth;
			var cntHeight=document.getElementById("dvContent").offsetHeight;
			var tdBodyObj=document.getElementsByTagName("TABLE")[0].rows[0].cells[0];
			if(tdBodyObj.offsetHeight<winHeight){
				tdBodyObj.style.height=winHeight+"px";
			}else if(tdBodyObj.offsetHeight>winHeight){
				if(cntHeight>winHeight){
					tdBodyObj.style.height=cntHeight+"px";
				}else{
					tdBodyObj.style.height=winHeight+"px";
				}
			}
		}
	CQ.content=new Object();
		CQ.content.loadInit=function(){
			CQ.global.replaceATags();
		}
	CQ.global = new Object();
	CQ.global.replaceATags=function(){
		var SYS_A=document.getElementsByTagName("A");
		try{
	    window.defaultStatus = "http://www.c-quadrat.at";
	  }catch(ex){/*nothing*/}
		for(var i=0;i<SYS_A.length;i++){
			if(SYS_A[i].href.toLowerCase().indexOf("http://",0)==-1 || SYS_A[i].href.toLowerCase().indexOf("www.",0)==-1){
				SYS_A[i].onmouseover=CQ.global.setWinStatus;
				SYS_A[i].onmouseout=CQ.global.clearWinStatus;
			}
		}
	}
	CQ.global.setWinStatus=function(e,callObj){
		if(document.all){e=event;}
		if(!callObj)callObj = this;
		var strCurrHref=callObj.href;
		strCurrHref=strCurrHref.replace(/(http:\/\/)/g,"");
		strCurrHref=strCurrHref.replace(/(c-quadrat.filedog.office.dd.loc\/)/g,"");
		strCurrHref=strCurrHref.replace(/(c-quadrat.diamonddogs.at\/)/g,"");
		try{window.status="http://www.c-quadrat.at/" + strCurrHref;}catch(ex){/*nothing*/}
		return true;
	}
	CQ.global.clearWinStatus=function(){
		try{window.defaultStatus = "http://www.c-quadrat.at";window.status = "http://www.c-quadrat.at";}catch(ex){/*nothing*/}
	}
