function openYTVideoPopup (videoID){
	
	// url to the popup file, add youtube video id as get param
	var videoPopupURL = 'videopopup.html?videoID='+videoID;
	
	var ytWindow = window.open(videoPopupURL, '', 'width=664,height=485,scrollbars=no,resizable=no');
	
	// open window and focus it
	ytWindow.focus();
}

// get http vars via javascript
HTTP_GET_VARS = new Array();
strGET = document.location.search.substr(1,document.location.search.length);

if(strGET!=''){
    gArr=strGET.split('&');
    for(i=0;i<gArr.length;++i)
        {
        v='';vArr=gArr[i].split('=');
        if(vArr.length>1){v=vArr[1];}
        HTTP_GET_VARS[unescape(vArr[0])]=unescape(v);
        }
}

function GET_HTTP_VAR(v){
	//log('doing it');
	//alert(HTTP_GET_VARS[v]);
	if(!HTTP_GET_VARS[v]){return 'undefined';}
	return HTTP_GET_VARS[v];
}