if (self.parent.frames.length != 0){self.parent.location=document.location;}

var ThirdPartyWindow = null;
function popUpWindow(aURL, aWidth, aHeight){
	if (!ThirdPartyWindow || ThirdPartyWindow.closed ) {
  		ThirdPartyWindow=window.open(aURL, "ThirdPartyWindow", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + aWidth + ",height=" + aHeight);
	} else{
  		ThirdPartyWindow.location=aURL;
		ThirdPartyWindow.focus();
 	}
}

var NewsWindow = null;
function popUpWindowNews(aURL, aWidth, aHeight){
	NewsWindow=window.open(aURL, "_blank", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + aWidth + ",height=" + aHeight);
}


function show(l) {
$('#'+l).modal({opacity:50});
}

var downloadURL = function(url)
{
    var iframe;
    iframe = document.getElementById("hiddenDownloader");
    if (iframe === null)
    {
        iframe = document.createElement('iframe');  
        iframe.id = "hiddenDownloader";
        iframe.style.visibility = 'hidden';
        document.body.appendChild(iframe);
    }
    iframe.src = url;  
    jQuery.modal.close() 
}

