// Modal Dialog Box
// copyright 8th July 2006 by Stephen Chapman
// http://javascript.about.com/
// permission to use this Javascript on your web page is granted
// provided that all of the code in this script (including these
// comments) is used without any alteration

function pageWidth() {
	return window.innerWidth != null? window.innerWidth: document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth:document.body != null? document.body.clientWidth:null;
	}

function pageHeight() {
	return window.innerHeight != null? window.innerHeight: document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight:document.body != null? document.body.clientHeight:null;
	}
	
function posLeft() {
	return typeof window.pageXOffset != 'undefined' ? window.pageXOffset:document.documentElement && document.documentElement.scrollLeft? document.documentElement.scrollLeft:document.body.scrollLeft? document.body.scrollLeft:0;
	}
	
function posTop() {
	return typeof window.pageYOffset != 'undefined' ? window.pageYOffset:document.documentElement && document.documentElement.scrollTop? document.documentElement.scrollTop: document.body.scrollTop?document.body.scrollTop:0;
	}
	
function $(x){
	return document.getElementById(x);
	}

function scrollFix(){
	var obol=$('ol');obol.style.top=posTop()+'px';obol.style.left=posLeft()+'px'
	}
	
function sizeFix(){
	var obol=$('ol');obol.style.height=pageHeight()+'px';obol.style.width=pageWidth()+'px';
	}
	
function kp(e){
	ky=e?e.which:event.keyCode;
	if(ky==88||ky==120)hm();
	return false
	}
	
function inf(h){
	tag=document.getElementsByTagName('select');
	for(i=tag.length-1;i>=0;i--)tag[i].style.visibility=h;tag=document.getElementsByTagName('iframe');
	for(i=tag.length-1;i>=0;i--)tag[i].style.visibility=h;tag=document.getElementsByTagName('object');
	for(i=tag.length-1;i>=0;i--)tag[i].style.visibility=h;
	}
	
function sm(obl, wd, ht){
	var h='hidden';
	var b='block';
	var p='px';
	var obol=$('ol'); 
	var obbxd = $('mbd');obbxd.innerHTML = $(obl).innerHTML;obol.style.height=pageHeight()+p;obol.style.width=pageWidth()+p;obol.style.top=posTop()+p;obol.style.left=posLeft()+p;obol.style.display=b;
	var tp=posTop()+((pageHeight()-ht)/2)-12;var lt=posLeft()+((pageWidth()-wd)/2)-12;
	var obbx=$('mbox');obbx.style.top=(tp<0?0:tp)+p;obbx.style.left=(lt<0?0:lt)+p;obbx.style.width=wd+p;obbx.style.height=ht+p;inf(h);obbx.style.display=b;
	return false;
	}
	
function hm(){
	var v='visible';
	var n='none'; $('ol').style.display=n;$('mbox').style.display=n;inf(v);document.onkeypress='';
	
	
	 
	}

function initmb(){
	var ab='absolute';
	var n='none';
	var obody=document.getElementsByTagName('body')[0];
	var frag=document.createDocumentFragment();
	var obol=document.createElement('div');obol.setAttribute('id','ol');obol.style.display=n;obol.style.position=ab;obol.style.top=0;obol.style.left=0;obol.style.zIndex=998;obol.style.width='100%';frag.appendChild(obol);
	var obbx=document.createElement('div');obbx.setAttribute('id','mbox');obbx.style.display=n;obbx.style.position=ab;obbx.style.zIndex=999;
	var obl=document.createElement('span');obbx.appendChild(obl);
	var obbxd=document.createElement('div');obbxd.setAttribute('id','mbd');obl.appendChild(obbxd);frag.insertBefore(obbx,obol.nextSibling);obody.insertBefore(frag,obody.firstChild); window.onscroll = scrollFix; window.onresize = sizeFix;
}

function insertNoticeCode()
{
	var code ="<div id=\"box\" class=\"dialog\">";
		code +="<div align=\"justify\" style=\"margin-left:10px; margin-right:10px; margin-top:10px;\">";                    
		code +="<div id=\"titles\" style=\"font-size:14px;\">NOTICE: You are leaving our website</div>";                    
		code +=" <br />";
		code +="The linked third party site is not under the control of The Bronx Institute or its <a href=\"Privacy_Policies.html\" class=\"TBLink\">privacy policies</a>. ";
		code +="We are providing a link to this website solely as a convenience to you because we believe this website may provide useful content. ";
		code +="<br /><br />";                    
		code +="<div style=\"text-align:center;\">";
		code +="<button onclick=\"hm('box');window.open(TextVarLink);\">Continue</button>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<button onclick=\"hm('box');NoSelected()\">Stay on this page</button>";
		code +="</div>";
		code +="</div>";
		code +="</div>";
		
		document.getElementById("NoticeContent").innerHTML = code;
}

function insertNoticeCodeGEARUP99()
{  
	var code ="<div style=\"border:1px; border-style:solid; border-color:#568EB6; background-image:url(IMG/balloons_side.png); -moz-border-radius-topleft: 10px; -moz-border-radius-bottomright: 10px;  -moz-border-radius-bottomleft: 10px; \" align=\"left\">";
		code +="<div class=\"float-right-t\" align=\"right\">";
		code +="<a style=\"cursor:pointer; border-bottom:none;\" onclick=\"javascript:insertNoticeCodeGEARUP2();LogoArrow1();\">";
		code +="<img class=\"no-border-Margin\" style=\"margin-right:5px; margin-top:5px;\" src=\"IMG/close.png\" width=\"16px\"> </a></div>   ";
		code +="<span style=\"color:#E87400; font-weight: bold; font-size:12px; ;\">"; 
		code +="<p style=\"padding-right:30px; \">Congratulations to the students from the GEAR UP &prime;99 Bronx Institute at Lehman College Program who are graduating from hundreds of different colleges and universities this year including:</p></span>"; 
		code +="<ul style=\"color:#000000; padding-left:35px; padding-right:0px;\">"; 
		code +="<li>CUNY Lehman College";
		code +="</li><li>CUNY Hunter College"; 
		code +="</li><li>CUNY John Jay College"; 
		code +="</li><li>SUNY University at Albany"; 
		code +="</li><li>SUNY Binghamton University"; 
		code +="</li><li>SUNY Buffalo State College"; 
		code +="</li><li>SUNY College at Old Westbury"; 
		code +="</li><li>SUNY University at Buffalo"; 
		code +="</li><li>SUNY Stony Brook University"; 
		code +="</li><li>SUNY Delhi"; 
		code +="</li><li>SUNY at Oswego"; 
		code +="</li><li>Boston College"; 
		code +="</li><li>College of Mount Saint Vincent "; 
		code +="</li><li>Fordham University"; 
		code +="</li><li>Hampton University"; 
		code +="</li><li>Hobart and William Smith Colleges"; 
		code +="</li><li>Howard University"; 
		code +="</li><li>Kean University"; 
		code +="</li><li>Macalester College"; 
		code +="</li><li>Manhattanville College"; 
		code +="</li><li>Morgan State University"; 
		code +="</li><li>Massachusetts Institute of Technology"; 
		code +="</li><li>Morgan State University"; 
		code +="</li><li>New York University"; 
		code +="</li><li>Nyack College"; 
		code +="</li><li>Pennsylvania State University"; 
		code +="</li><li>Rensselaer Polytechnic Institute"; 
		code +="</li><li>Syracuse University"; 
		code +="</li><li>University of Vermont"; 
		code +="</li>"; 
		code +="</ul>"; 
		code +="<br></div>";
		code +="<br><p>&nbsp;</P>";


		
		document.getElementById("Congratulation").innerHTML = code;
}


function LogoArrow1()
{
	var code3 ="<a style=\"cursor:pointer; border-bottom:none;\" onclick=\"javascript:insertNoticeCodeGEARUP99();LogoArrow2();\"><img src=\"IMG/CongratulationGEAR-UP_99.png\" width=\"400\" style=\"margin-right:1px; border-color:#CCC;\" /> ";
	    code3 +="<img id=\"DownArrow\" src=\"IMG/LinkArrowsDown2.gif\" width=\"18\" height=\"28\"  align=\"top\" style=\"margin-left:0px; margin-right:0px;\" /></a> ";


		document.getElementById("LogoArrow").innerHTML = code3;

}

function LogoArrow2()
{
	var code2 ="<a style=\"cursor:pointer; border-bottom:none;\" onclick=\"javascript:insertNoticeCodeGEARUP2();LogoArrow1();\"><img src=\"IMG/CongratulationGEAR-UP_99.png\" width=\"400\" style=\"margin-right:1px; border-color:#CCC;\" /> ";
	    code2 +="<img id=\"DownArrow\" src=\"IMG/LinkArrowsUp2.gif\" width=\"18\" height=\"28\"  align=\"top\" style=\"margin-left:0px; margin-right:0px;\" /></a> ";


		document.getElementById("LogoArrow").innerHTML = code2;

}

function insertNoticeCodeGEARUP2()
{
	var code ="";
	
	
	document.getElementById("Congratulation").innerHTML = code;
}

window.onload = initmb;
                  
