function showPopup (page,width,height,resizeable,scrollbars) {
  day = new Date();
  id = day.getTime();
  eval("page" + id + " = window.open('"+page+"', '" + id + "', 'toolbar=0,scrollbars='+scrollbars+',location=0,statusbar=0,menubar=0,resizable='+resizeable+',width="+width+",height="+height+"');");
};



function checkIE6 () {
	var Browser = {
	  Version: function() {
	    var version = 999; // we assume a sane browser
	    if (navigator.appVersion.indexOf("MSIE") != -1)
	      // bah, IE again, lets downgrade version number
	      version = parseFloat(navigator.appVersion.split("MSIE")[1]);
	    return version;
	  }
	}
	if (Browser.Version() < 7) {
	  document.getElementById('warning_ie6').style.display='block';
	}
}

toggleFlag = true;

function showContentProject (idx) {
/*
	var project = document.getElementById ('content_project');
	if (!project)
		return;

	var content = document.getElementById ('content_project_'+idx);
	if (!content)
		return;
		
	project.innerHTML = content.innerHTML;
*/

	var idName = 'content_project_overlay';
	var idName2 = 'content_project';
	toggleFlag^=true;
	if (toggleFlag) {
		idName = 'content_project';
		idName2 = 'content_project_overlay';
	}

	$('#'+idName).hide ().html ($('#content_project_'+idx).html());
	$('#'+idName2).fadeOut ('800', function(){ });
	$('#'+idName).fadeIn   ('800', function(){ });
/*
	$('#content_project_img_'+idx).load(function() {	
			$('#'+idName2).fadeOut ('800', function(){ });
			$('#'+idName).fadeIn   ('800', function(){ });
	});
*/

	$('#content_project_img_'+idx).one("load",function(){
		//do something
		$('#'+idName2).fadeOut ('800', function(){ });
		$('#'+idName).fadeIn   ('800', function(){ });
	})
	.each(function(){
		if(this.complete || (jQuery.browser.msie && parseInt(jQuery.browser.version) == 6))
		$(this).trigger("load");
	}); 

//	$('#content_project').html ($('#content_project_'+idx).html()).fadeIn('500', function(){ });
}

function showProjectInfo (idx) {
	/*
	var info = document.getElementById ('project_info_'+idx);
	if (!info)
		return;
	info.style.display='block';
	info.style.visibility='visible';
	*/
	TagToTip('project_info_'+idx);

}

function hideProjectInfo (idx) {
	UnTip ();
	/*
	var info = document.getElementById ('project_info_'+idx);
	if (!info)
		return;
	info.style.display='none';
	info.style.visibility='hidden';
	*/
	
}	
