var rootdomain="http://"+window.location.hostname;

function includePage(url) {
var page_request = false;
if (window.XMLHttpRequest) // if Mozilla, Safari etc
    page_request = new XMLHttpRequest();
    else if (window.ActiveXObject){ // if IE
        try {
        page_request = new ActiveXObject("Msxml2.XMLHTTP");
        } 
        catch (e){
            try {
            page_request = new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch (e){}
        }
    }
else
    return false;
    page_request.open('GET', url, false); //get page synchronously 
    page_request.send(null);
    writecontent(page_request);
}

function writecontent(page_request){
    if (window.location.href.indexOf("http")==-1 || page_request.status==200) {
        if (document.getElementById) {
            var myID = document.getElementById('vColl');
            myID.innerHTML = page_request.responseText;
         }
    }
}

function detect(){
	if(window.screen.availHeight < 820)
		newWin('/planet-v/start');
	else
		location.href='/planet-v/start';
}

function newWin(link) {   
var v = window.open(link, "planetv", "top=0,left=0,height="+window.screen.availHeight+" width="+window.screen.availWidth+",menubar=no,status=no,toolbar=yes,location=no,scrollbars=yes,resizable=yes")   
return false;   
v.focus();
}
function linkPop() { 
	if (!document.getElementsByTagName) return false; 
	var links=document.getElementsByTagName("a"); 
	for (var i=0; i < links.length; i++) {    
		if (links[i].className.match("popup")) { 	
			links[i].onclick=function() { 	    
				newWin(this.href);	
			}    
		} 
	}
}

