function openup(type,content,width,height)
{
		// HIDER
		popHider = document.createElement('div');
		popHider.setAttribute('id','popHider');
		popHider.style.height = document.body.clientHeight + "px";
		popHider.onclick = function(){popCloser()};
		document.body.appendChild(popHider);

		// ALLOWS FOR CENTERING OF CONTENT
		popCover = document.createElement('div');
		popCover.setAttribute('id','popCover');
		// popCover.onclick = function(){popCloser()};
		document.body.appendChild(popCover);


		////HOLDS CONTENT AND CLOSER ///
		popHolder = document.createElement('div');
		popHolder.setAttribute('id','popHolder');
		popHolder.style.width = width + "px";
		popHolder.style.opacity = 0;
		popHolder.style.filter = "alpha(opacity=0)";
		document.getElementById('popCover').appendChild(popHolder);
		
		////CLOSER ///
		popClose = document.createElement('div');
		popClose.setAttribute('id','popClose');
		//popClose.style.width = width + "px";
		popClose.innerHTML = 'Close';
		popClose.onclick = function(){popCloser()};
		document.getElementById('popHolder').appendChild(popClose);
		//pCloseWidth = width -document.getElementById('popHolder').style.padding;
		//document.getElementById('popHolder').style.width = pCloseWidth+"px";
		

		// DECIDE IF IT"S HTML CONTENT OR NOT //
		if(type =="html")
		{
			// THE HTML PAGE HOLDER
					// CHECK IF IE
					if(!self.outerWidth)
					{
						popContent = document.createElement('<iframe marginheight="0">');//ITS IE
					}
					else //NOT IE
					{
					popContent = document.createElement('iframe');
					popContent.setAttribute('marginheight','0');
					}
			popContent.setAttribute('id','popContent');
			popContent.setAttribute('width',width);
			popContent.setAttribute('height',height);
			popContent.setAttribute('frameborder','0');
			popContent.setAttribute('marginwidth','0');
			popContent.setAttribute('allowtransparency','true');
			popContent.src = content;
			document.getElementById('popHolder').appendChild(popContent);
		}
		else if(type == "flash")
		{
		popContent = document.createElement('div');
		popContent.setAttribute('id','popContent');
		popContent.style.width = width + "px";
		popContent.style.height = height + "px";
		popContent.innerHTML = ('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 		codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + width + '" height="' + height + '" />\n') + ('<param name="movie" value="' + content + '" ' + ' />\n') + ('<param name="quality" value="high" />\n') + ('<param name="WMODE" value="transparent">\n') + ('<embed src="' + content + '"' + 'width="' + width + '" height="' + height + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" </embed>\n') + ('</object />\n');
		document.getElementById('popHolder').appendChild(popContent);
			
		}
		
		else
		{
			// THE OTHER HOLDER
			popContent = document.createElement('div');
			popContent.setAttribute('id','popContent');
			popContent.style.width = width + "px";
			popContent.style.height = height + "px";
			popContent.innerHTML = content;
			document.getElementById('popHolder').appendChild(popContent);
			
		}
		
	showContent();	
}

function showContent()
{
$("#popHolder").fadeTo("slow",1);	
}

function popCloser()
{

		popHider = document.getElementById('popHider');
		popCover = document.getElementById('popCover');
		document.body.removeChild(popCover);	
		document.body.removeChild(popHider);

}


