
function rrajax(cmd, tem, qid, cid){
var xmlHttp;
try
	{
	xmlHttp=new XMLHttpRequest();
	}
	catch(e)
	{
	try
		{
		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e)
		{
		try
			{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e)
			{
			//alert("Ihr Browser ist nicht AJAX Kompatibel\nwww.reginaray.de verwendet Scripte die muessen AJAX-faehig sein!!\nmehr ueber Ajax finden Sie in die Web. Aber Sie koennen auch in ein anderer Browser es nochmal versuchen\n\nDanke\n-ReginaRay.de");
			alert("Bitte verwenden Sie AJAX kompatibel Browser! \nDanke");
			return false;
			}
		}
	}
	xmlHttp.onreadystatechange = function()
	{
	if(xmlHttp.readyState == 4){
		if(cmd == "v" || cmd == "i" || cmd == "c"){
			document.getElementById('spotlight').innerHTML = xmlHttp.responseText;
			document.getElementById('home').style.display = "block";
		}else{
			document.getElementById('home').style.display = "none";
		}
	}
	}
	
	xmlHttp.open("GET","/cmix/cmix/cview.php?cmd="+cmd+'&tem='+tem+'&qid='+qid+'&cid='+cid,true);
	xmlHttp.send(null);
}

function GetMailTemplate(){
myLoc = "/cmix/cmix/cMail.php";
myProp = "left=5,top=5,width=600,height=760,resizable=1,location=0,menubar=0,scrollbars=auto,status=0,toolbar=0";
RrWin = window.open(myLoc,'RrContact',myProp);
if(RrWin) RrWin.focus();
}

function AttachmentDisplay(){
myProp = "left=5,top=5,width=500,height=660,resizable=1,location=0,menubar=0,scrollbars=auto,status=0,toolbar=0";
RrWin = window.open('RrContact',myProp);
if(RrWin) RrWin.focus();
}

function RrWindow(mypage, myname, w, h) {
var rrLt = (screen.width - w) / 2;
if(h > (screen.height)){
    var  rrRt = (screen.height);
}else{   
    var rrRt = (screen.height - h) / 2;
}
rrProps = 'height='+h+',width='+w+',top='+rrRt+',left='+rrLt+',location=0,scrollbars=1,resizable=0,status=1'
rrWin = window.open(mypage, myname, rrProps)

if(rrWin) rrWin.focus();
}
