// neue Fenster ankuendigen
var xmlHttp;
function aNeuesFenster() {
    if (document.getElementById) {
        var anker = '';
        var i = 0;
        var test = '';
        do {
            anker += document.links[i].className;
            if (document.links[i].className.match(/neuesFenster/)) {
                document.links[i].title = document.links[i].title + ' (neues Fenster)';
                document.links[i]['onclick'] = new Function("window.open(this.href, 'new', 'toolbar=1, menubar=1, location=1,  status=1, scrollbars=1, resizable=1'); return false;");
            }
            i++;
        } while (i <= document.links.length-1);
    }
}

function switchit(list)
	{
		var listElementStyle=document.getElementById(list).style;
		if (listElementStyle.display=="none")
		{
			listElementStyle.display="block";
		}
		else
		{
			listElementStyle.display="none";
		}
		return false;
	}
 function CreateBookmarkLink() {

 title = "FACTIndia TV"; 
  // Blogger - Replace with <$BlogItemTitle$> 
  // MovableType - Replace with <$MTEntryTitle$>

 url = location.href;


	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { // Opera Hotlist
		return true; }
 }

 function submitEmail(myform)
 {
	var email=myform.emailfeld.value;
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return false;
	}
	var param="email="+email;
	url="addemail.php";
	xmlHttp.onreadystatechange=stateChanged
	xmlHttp.open("POST",url,true)
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", param.length);
	xmlHttp.setRequestHeader("Connection", "close");
	xmlHttp.send(param);
	return false;
 }

	function stateChanged(){ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
				document.getElementById('email').innerHTML=xmlHttp.responseText;
		} 
	}
	
	function GetXmlHttpObject(){
		var xmlHttp=null;
		try
			{
			// Firefox, Opera 8.0+, Safari
			xmlHttp=new XMLHttpRequest();
			}
		catch (e)
			{
				// Internet Explorer
			try
				{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
				}
			catch (e)
				{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
			}

		return xmlHttp;
	}


