// COPYRIGHT NOTE			= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
var MyEmbY = new Date()
if (top != self) top.location = location;
function click() {
	if (event.button==2) {
		alert('Copyright © 1998 - ' + MyEmbY.getFullYear() + ' Embarazada.com, Inc. All rights reserved.')
	}
}
document.onmousedown=click
version=parseInt(navigator.appVersion);
browser='OTHER';
if (navigator.appName=='Netscape'){browser='NS'+version;}
if (navigator.appName=='Microsoft Internet Explorer'){browser='MSIE'+version;}
if (navigator.appVersion.indexOf('MSIE 3')>0) {browser='MSIE3';}
if (browser=='MSIE3') {window.location='http://www.embarazada.com/navegadores3.htm'}
if (browser=='NS3') {window.location='http://www.embarazada.com/navegadores3.htm'}
if (browser=='OTHER') {window.location='http://www.embarazada.com/navegadores3.htm'}

// FLOATING LAYER			= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
floatX=785;
floatY=48;
layerwidth=120;
layerheight=600;
halign="left";
valign="top";
delayspeed=3;

NS6=false;
IE4=(document.all);
if (!IE4) {NS6=(document.getElementById);}
NS4=(document.layers);

function adjust() {
if ((NS4) || (NS6)) {
if (lastX==-1 || delayspeed==0)
{
lastX=window.pageXOffset + floatX;
lastY=window.pageYOffset + floatY;
}
else
{
var dx=Math.abs(window.pageXOffset+floatX-lastX);
var dy=Math.abs(window.pageYOffset+floatY-lastY);
var d=Math.sqrt(dx*dx+dy*dy);
var c=Math.round(d/10);
if (window.pageXOffset+floatX>lastX) {lastX=lastX+delayspeed+c;}
if (window.pageXOffset+floatX<lastX) {lastX=lastX-delayspeed-c;}
if (window.pageYOffset+floatY>lastY) {lastY=lastY+delayspeed+c;}
if (window.pageYOffset+floatY<lastY) {lastY=lastY-delayspeed-c;}
}
if (NS4){
//document.layers['floatlayer'].pageX = lastX;
document.layers['floatlayer'].pageY = lastY;
}
if (NS6){
//document.getElementById('floatlayer').style.left=lastX;
document.getElementById('floatlayer').style.top=lastY;
}
}
else if (IE4){
if (lastX==-1 || delayspeed==0)
{
lastX=document.body.scrollLeft + floatX;
lastY=document.body.scrollTop + floatY;
}
else
{
var dx=Math.abs(document.body.scrollLeft+floatX-lastX);
var dy=Math.abs(document.body.scrollTop+floatY-lastY);
var d=Math.sqrt(dx*dx+dy*dy);
var c=Math.round(d/10);
if (document.body.scrollLeft+floatX>lastX) {lastX=lastX+delayspeed+c;}
if (document.body.scrollLeft+floatX<lastX) {lastX=lastX-delayspeed-c;}
if (document.body.scrollTop+floatY>lastY) {lastY=lastY+delayspeed+c;}
if (document.body.scrollTop+floatY<lastY) {lastY=lastY-delayspeed-c;}
}
//document.all['floatlayer'].style.posLeft = lastX;
document.all['floatlayer'].style.posTop = lastY;
} 
setTimeout('adjust()',50);
}

function define()
{
if ((NS4) || (NS6)) 
{ 
if (halign=="left") {floatX=ifloatX};
if (halign=="right") {floatX=window.innerWidth-ifloatX-layerwidth-20};
if (halign=="center") {floatX=Math.round((window.innerWidth-20)/2)-Math.round(layerwidth/2)};
if (valign=="top") {floatY=ifloatY};
if (valign=="bottom") {floatY=window.innerHeight-ifloatY-layerheight};
if (valign=="center") {floatY=Math.round((window.innerHeight-20)/2)-Math.round(layerheight/2)};
}
if (IE4) 
{
if (halign=="left") {floatX=ifloatX};
if (halign=="right") {floatX=document.body.offsetWidth-ifloatX-layerwidth-20}
if (halign=="center") {floatX=Math.round((document.body.offsetWidth-20)/2)-Math.round(layerwidth/2)}
if (valign=="top") {floatY=ifloatY};
if (valign=="bottom") {floatY=document.body.offsetHeight-ifloatY-layerheight}
if (valign=="center") {floatY=Math.round((document.body.offsetHeight-20)/2)-Math.round(layerheight/2)}
}
}

// SET IMAGE				= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

<!--
cacheImg = new Array();
function SetImage(imgObjectName, cacheindex) 
{
 if (navigator.userAgent.indexOf ("Mozilla/4") >= 0) 
	{
		imgObject = imgObjectName;
		imgObject.src = cacheImg[cacheindex].src;
	}
}
function CacheImage(i, img) 
{
	if (navigator.userAgent.indexOf ("Mozilla/4") >= 0) 
	{
		cacheImg[i] = new Image();
		cacheImg[i].src = img;
	}
}
cacheImg = new Array();
CacheImage( 01,'http://www.embarazada.com/pix/PrintOn.gif');
CacheImage( 02,'http://www.embarazada.com/pix/PrintOff.gif');
CacheImage( 03,'http://www.embarazada.com/pix/EmailOn.gif');
CacheImage( 04,'http://www.embarazada.com/pix/EmailOff.gif');

CacheImage( 05,'http://www.embarazada.com/pix/Button01On.gif');
CacheImage( 06,'http://www.embarazada.com/pix/Button01Off.gif');
CacheImage( 07,'http://www.embarazada.com/pix/Button02On.gif');
CacheImage( 08,'http://www.embarazada.com/pix/Button02Off.gif');
CacheImage( 09,'http://www.embarazada.com/pix/Button03On.gif');
CacheImage( 10,'http://www.embarazada.com/pix/Button03Off.gif');
CacheImage( 11,'http://www.embarazada.com/pix/Button04On.gif');
CacheImage( 12,'http://www.embarazada.com/pix/Button04Off.gif');
CacheImage( 13,'http://www.embarazada.com/pix/Button05On.gif');
CacheImage( 14,'http://www.embarazada.com/pix/Button05Off.gif');
CacheImage( 15,'http://www.embarazada.com/pix/Button06On.gif');
CacheImage( 16,'http://www.embarazada.com/pix/Button06Off.gif');

var NS4 = (document.layers) ? 1 : 0;
var IE4 = (document.all) ? 1 : 0;
//-->

// Disable select-text script- © Dynamic Drive (www.dynamicdrive.com)

<!--
var omitformtags=["input", "textarea", "select"]

omitformtags=omitformtags.join("|")

function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}

function reEnable(){
return true
}

if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
//-->

function openW(mypage,myname,w,h,features) {
if(screen.width){
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
}else{winl = 0;wint =0;}
if (winl < 0) winl = 0;
if (wint < 0) wint = 0;
var settings = 'height=' + h + ',';
settings += 'width=' + w + ',';
settings += 'top=' + wint + ',';
settings += 'left=' + winl + ',';
settings += features;
win = window.open(mypage,myname,settings);
win.window.focus();
}

// DHTML WINDOW & MODAL WINDOW  = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

// DHTML Window Widget- By Dynamic Drive, available at: http://www.dynamicdrive.com

var dhtmlwindow={
imagefiles:['pix/windowfiles/min.gif', 'pix/windowfiles/close.gif', 'pix/windowfiles/restore.gif', 'pix/windowfiles/resize.gif'], //Path to 4 images used by script, in that order
ajaxbustcache: true, //Bust caching when fetching a file via Ajax?

minimizeorder: 0,
tobjects: [], //object to contain references to dhtml window divs, for cleanup purposes

init:function(t){
	var domwindow=document.createElement("div") //create dhtml window div
	domwindow.id=t
	domwindow.className="dhtmlwindow"
	var domwindowdata=''
	domwindowdata='<div class="drag-handle">'
	domwindowdata+='DHTML Window <div class="drag-controls"><img src="'+this.imagefiles[0]+'" title="Minimize" /><img src="'+this.imagefiles[1]+'" title="Cerrar Ventana" /></div>'
	domwindowdata+='</div>'
	domwindowdata+='<div class="drag-contentarea"></div>'
	domwindowdata+='<div class="drag-statusarea"><div class="drag-resizearea" style="background: transparent url('+this.imagefiles[3]+') top right no-repeat;">&nbsp;</div></div>'
	domwindowdata+='</div>'
	domwindow.innerHTML=domwindowdata
	document.getElementById("dhtmlwindowholder").appendChild(domwindow)
	this.zIndexvalue=(this.zIndexvalue)? this.zIndexvalue+1 : 200 //z-index value for DHTML window: starts at 0, increments whenever a window has focus
	var t=document.getElementById(t)
	var divs=t.getElementsByTagName("div")
	for (var i=0; i<divs.length; i++){ //go through divs inside dhtml window and extract all those with class="drag-" prefix
		if (/drag-/.test(divs[i].className))
			t[divs[i].className.replace(/drag-/, "")]=divs[i] //take out the "drag-" prefix for shorter access by name
	}
	t.style.zIndex=this.zIndexvalue //set z-index of this dhtml window
	t.handle._parent=t //store back reference to dhtml window
	t.resizearea._parent=t //same
	t.controls._parent=t //same
	t.onclose=function(){return true} //custom event handler "onclose"
	t.onmousedown=function(){dhtmlwindow.zIndexvalue++; this.style.zIndex=dhtmlwindow.zIndexvalue} //Increase z-index of window when focus is on it
	t.handle.onmousedown=dhtmlwindow.setupdrag //set up drag behavior when mouse down on handle div
	t.resizearea.onmousedown=dhtmlwindow.setupdrag //set up drag behavior when mouse down on resize div
	t.controls.onclick=dhtmlwindow.enablecontrols
	t.show=function(){dhtmlwindow.show(this)} //public function for showing dhtml window
	t.hide=function(){dhtmlwindow.close(this)} //public function for hiding dhtml window
	t.setSize=function(w, h){dhtmlwindow.setSize(this, w, h)} //public function for setting window dimensions
	t.moveTo=function(x, y){dhtmlwindow.moveTo(this, x, y)} //public function for moving dhtml window (relative to viewpoint)
	t.isResize=function(bol){dhtmlwindow.isResize(this, bol)} //public function for specifying if window is resizable
	t.isScrolling=function(bol){dhtmlwindow.isScrolling(this, bol)} //public function for specifying if window content contains scrollbars
	t.load=function(contenttype, contentsource, title){dhtmlwindow.load(this, contenttype, contentsource, title)} //public function for loading content into window
	this.tobjects[this.tobjects.length]=t
	return t //return reference to dhtml window div
},

open:function(t, contenttype, contentsource, title, attr, recalonload){
	var d=dhtmlwindow //reference dhtml window object
	function getValue(Name){
		var config=new RegExp(Name+"=([^,]+)", "i") //get name/value config pair (ie: width=400px,)
		return (config.test(attr))? parseInt(RegExp.$1) : 0 //return value portion (int), or 0 (false) if none found
	}
	if (document.getElementById(t)==null) //if window doesn't exist yet, create it
		t=this.init(t) //return reference to dhtml window div
	else
		t=document.getElementById(t)
	t.setSize(getValue(("width")), (getValue("height"))) //Set dimensions of window
	var xpos=getValue("center")? "middle" : getValue("left") //Get x coord of window
	var ypos=getValue("center")? "middle" : getValue("top") //Get y coord of window
	//t.moveTo(xpos, ypos) //Position window
	if (typeof recalonload!="undefined" && recalonload=="recal" && this.scroll_top==0){ //reposition window when page fully loads with updated window viewpoints?
		if (window.attachEvent && !window.opera) //In IE, add another 400 milisecs on page load (viewpoint properties may return 0 b4 then)
			this.addEvent(window, function(){setTimeout(function(){t.moveTo(xpos, ypos)}, 400)}, "load")
		else
			this.addEvent(window, function(){t.moveTo(xpos, ypos)}, "load")
	}
	t.isResize(getValue("resize")) //Set whether window is resizable
	t.isScrolling(getValue("scrolling")) //Set whether window should contain scrollbars
	t.style.visibility="visible"
	t.style.display="block"
	t.contentarea.style.display="block"
	t.moveTo(xpos, ypos) //Position window
	t.load(contenttype, contentsource, title)
	if (t.state=="minimized" && t.controls.firstChild.title=="Restore"){ //If window exists and is currently minimized?
		t.controls.firstChild.setAttribute("src", dhtmlwindow.imagefiles[0]) //Change "restore" icon within window interface to "minimize" icon
		t.controls.firstChild.setAttribute("title", "Minimize")
		t.state="fullview" //indicate the state of the window as being "fullview"
	}
	return t
},

setSize:function(t, w, h){ //set window size (min is 150px wide by 100px tall)
	t.style.width=Math.max(parseInt(w), 150)+"px"
	t.contentarea.style.height=Math.max(parseInt(h), 100)+"px"
},

moveTo:function(t, x, y){ //move window. Position includes current viewpoint of document
	this.getviewpoint() //Get current viewpoint numbers
	t.style.left=(x=="middle")? this.scroll_left+(this.docwidth-t.offsetWidth)/2+"px" : this.scroll_left+parseInt(x)+"px"
	t.style.top=(y=="middle")? this.scroll_top+(this.docheight-t.offsetHeight)/2+"px" : this.scroll_top+parseInt(y)+"px"
},

isResize:function(t, bol){ //show or hide resize inteface (part of the status bar)
	t.statusarea.style.display=(bol)? "block" : "none"
	t.resizeBool=(bol)? 1 : 0
},

isScrolling:function(t, bol){ //set whether loaded content contains scrollbars
	t.contentarea.style.overflow=(bol)? "auto" : "hidden"
},

load:function(t, contenttype, contentsource, title){ //loads content into window plus set its title (3 content types: "inline", "iframe", or "ajax")
	var contenttype=contenttype.toLowerCase() //convert string to lower case
	if (typeof title!="undefined")
		t.handle.firstChild.nodeValue=title
	if (contenttype=="inline")
		t.contentarea.innerHTML=contentsource
	else if (contenttype=="div"){
		t.contentarea.innerHTML=document.getElementById(contentsource).innerHTML //Populate window with contents of specified div on page
		document.getElementById(contentsource).style.display="none" //hide that div
	}
	else if (contenttype=="iframe"){
		t.contentarea.style.overflow="hidden" //disable window scrollbars, as iframe already contains scrollbars
		if (!t.contentarea.firstChild || t.contentarea.firstChild.tagName!="IFRAME") //If iframe tag doesn't exist already, create it first
			t.contentarea.innerHTML='<iframe src="" style="margin:0; padding:0; width:100%; height: 100%" name="_iframe-'+t.id+'"></iframe>'
		window.frames["_iframe-"+t.id].location.replace(contentsource) //set location of iframe window to specified URL
		}
	else if (contenttype=="ajax"){
		this.ajax_connect(contentsource, t) //populate window with external contents fetched via Ajax
	}
	t.contentarea.datatype=contenttype //store contenttype of current window for future reference
},

setupdrag:function(e){
	var d=dhtmlwindow //reference dhtml window object
	var t=this._parent //reference dhtml window div
	d.etarget=this //remember div mouse is currently held down on ("handle" or "resize" div)
	var e=window.event || e
	d.initmousex=e.clientX //store x position of mouse onmousedown
	d.initmousey=e.clientY
	d.initx=parseInt(t.offsetLeft) //store offset x of window div onmousedown
	d.inity=parseInt(t.offsetTop)
	d.width=parseInt(t.offsetWidth) //store width of window div
	d.contentheight=parseInt(t.contentarea.offsetHeight) //store height of window div's content div
	if (t.contentarea.datatype=="iframe"){ //if content of this window div is "iframe"
		t.style.backgroundColor="#F8F8F8" //colorize and hide content div (while window is being dragged)
		t.contentarea.style.visibility="hidden"
	}
	document.onmousemove=d.getdistance //get distance travelled by mouse as it moves
	document.onmouseup=function(){
		if (t.contentarea.datatype=="iframe"){ //restore color and visibility of content div onmouseup
			t.contentarea.style.backgroundColor="white"
			t.contentarea.style.visibility="visible"
		}
		d.stop()
	}
	return false
},

getdistance:function(e){
	var d=dhtmlwindow
	var etarget=d.etarget
	var e=window.event || e
	d.distancex=e.clientX-d.initmousex //horizontal distance travelled relative to starting point
	d.distancey=e.clientY-d.initmousey
	if (etarget.className=="drag-handle") //if target element is "handle" div
		d.move(etarget._parent, e)
	else if (etarget.className=="drag-resizearea") //if target element is "resize" div
		d.resize(etarget._parent, e)
	return false //cancel default dragging behavior
},

getviewpoint:function(){ //get window viewpoint numbers
	var ie=document.all && !window.opera
	var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000 //Preliminary doc width in non IE browsers
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
	this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
	this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
	this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
},

rememberattrs:function(t){ //remember certain attributes of the window when it's minimized or closed, such as dimensions, position on page
	this.getviewpoint() //Get current window viewpoint numbers
	t.lastx=parseInt((t.style.left || t.offsetLeft))-dhtmlwindow.scroll_left //store last known x coord of window just before minimizing
	t.lasty=parseInt((t.style.top || t.offsetTop))-dhtmlwindow.scroll_top
	t.lastwidth=parseInt(t.style.width) //store last known width of window just before minimizing/ closing
},

move:function(t, e){
	t.style.left=dhtmlwindow.distancex+dhtmlwindow.initx+"px"
	t.style.top=dhtmlwindow.distancey+dhtmlwindow.inity+"px"
},

resize:function(t, e){
	t.style.width=Math.max(dhtmlwindow.width+dhtmlwindow.distancex, 150)+"px"
	t.contentarea.style.height=Math.max(dhtmlwindow.contentheight+dhtmlwindow.distancey, 100)+"px"
},

enablecontrols:function(e){
	var d=dhtmlwindow
	var sourceobj=window.event? window.event.srcElement : e.target //Get element within "handle" div mouse is currently on (the controls)
	if (/Minimize/i.test(sourceobj.getAttribute("title"))) //if this is the "minimize" control
		d.minimize(sourceobj, this._parent)
	else if (/Restore/i.test(sourceobj.getAttribute("title"))) //if this is the "restore" control
		d.restore(sourceobj, this._parent)
	else if (/Close/i.test(sourceobj.getAttribute("title"))) //if this is the "close" control
		d.close(this._parent)
	return false
},

minimize:function(button, t){
	dhtmlwindow.rememberattrs(t)
	button.setAttribute("src", dhtmlwindow.imagefiles[2])
	button.setAttribute("title", "Restore")
	t.state="minimized" //indicate the state of the window as being "minimized"
	t.contentarea.style.display="none"
	t.statusarea.style.display="none"
	if (typeof t.minimizeorder=="undefined"){ //stack order of minmized window on screen relative to any other minimized windows
		dhtmlwindow.minimizeorder++ //increment order
		t.minimizeorder=dhtmlwindow.minimizeorder
	}
	t.style.left="10px" //left coord of minmized window
	t.style.width="200px"
	var windowspacing=t.minimizeorder*10 //spacing (gap) between each minmized window(s)
	t.style.top=dhtmlwindow.scroll_top+dhtmlwindow.docheight-(t.handle.offsetHeight*t.minimizeorder)-windowspacing+"px"
},

restore:function(button, t){
	dhtmlwindow.getviewpoint()
	button.setAttribute("src", dhtmlwindow.imagefiles[0])
	button.setAttribute("title", "Minimize")
	t.state="fullview" //indicate the state of the window as being "fullview"
	t.style.display="block"
	t.contentarea.style.display="block"
	if (t.resizeBool) //if this window is resizable, enable the resize icon
		t.statusarea.style.display="block"
	t.style.left=parseInt(t.lastx)+dhtmlwindow.scroll_left+"px" //position window to last known x coord just before minimizing
	t.style.top=parseInt(t.lasty)+dhtmlwindow.scroll_top+"px"
	t.style.width=parseInt(t.lastwidth)+"px"
},


close:function(t){
	try{
		var closewinbol=t.onclose()
	}
	catch(err){ //In non IE browsers, all errors are caught, so just run the below
		var closewinbol=true
 }
	finally{ //In IE, not all errors are caught, so check if variable isn't defined in IE in those cases
		if (typeof closewinbol=="undefined"){
			alert("An error has occured somwhere inside your \"onclose\" event handler")
			var closewinbol=true
		}
	}
	if (closewinbol){ //if custom event handler function returns true
		if (t.state!="minimized") //if this window isn't currently minimized
			dhtmlwindow.rememberattrs(t) //remember window's dimensions/position on the page before closing
		t.style.display="none"
	}
	return closewinbol
},

show:function(t){
	if (t.lastx) //If there exists previously stored information such as last x position on window attributes (meaning it's been minimized or closed)
		dhtmlwindow.restore(t.controls.firstChild, t) //restore the window using that info
	else
		t.style.display="block"
	t.state="fullview" //indicate the state of the window as being "fullview"
},

ajax_connect:function(url, t){
	var page_request = false
	var bustcacheparameter=""
	if (window.XMLHttpRequest) // if Mozilla, IE7, Safari etc
		page_request = new XMLHttpRequest()
	else if (window.ActiveXObject){ // if IE6 or below
		try {
		page_request = new ActiveXObject("Msxml2.XMLHTTP")
		} 
		catch (e){
			try{
			page_request = new ActiveXObject("Microsoft.XMLHTTP")
			}
			catch (e){}
		}
	}
	else
		return false
	page_request.onreadystatechange=function(){dhtmlwindow.ajax_loadpage(page_request, t)}
	if (this.ajaxbustcache) //if bust caching of external page
		bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
	page_request.open('GET', url+bustcacheparameter, true)
	page_request.send(null)
},

ajax_loadpage:function(page_request, t){
	if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){
	t.contentarea.innerHTML=page_request.responseText
	}
},


stop:function(){
	dhtmlwindow.etarget=null //clean up
	document.onmousemove=null
	document.onmouseup=null
},

addEvent:function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
	var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
	if (target.addEventListener)
		target.addEventListener(tasktype, functionref, false)
	else if (target.attachEvent)
		target.attachEvent(tasktype, functionref)
},

cleanup:function(){
	for (var i=0; i<dhtmlwindow.tobjects.length; i++){
		dhtmlwindow.tobjects[i].handle._parent=dhtmlwindow.tobjects[i].resizearea._parent=dhtmlwindow.tobjects[i].controls._parent=null
	}
	window.onload=null
}

} //End dhtmlwindow object

document.write('<div id="dhtmlwindowholder"><span style="display:none">.</span></div>') //container that holds all dhtml window divs on page
window.onunload=dhtmlwindow.cleanup

// DHTML Modal window- By Dynamic Drive, available at: http://www.dynamicdrive.com

if (typeof dhtmlwindow=="undefined")
alert('ERROR: Modal Window script requires all files from "DHTML Window widget" in order to work!')

var dhtmlmodal={
veilstack: 0,
open:function(t, contenttype, contentsource, title, attr, recalonload){
	var d=dhtmlwindow //reference dhtmlwindow object
	this.interVeil=document.getElementById("interVeil") //Reference "veil" div
	this.veilstack++ //var to keep track of how many modal windows are open right now
	this.loadveil()
	if (typeof recalonload!="undefined" && recalonload=="recal" && d.scroll_top==0)
		d.addEvent(window, function(){dhtmlmodal.loadveil()}, "load")
		var t=d.open(t, contenttype, contentsource, title, attr, recalonload)
	t.controls.firstChild.style.display="none" //Disable "minimize" button
	t.controls.onclick=function(){dhtmlmodal.forceclose(this._parent)} //OVERWRITE default control action with new one
	t.show=function(){dhtmlmodal.show(this)} //OVERWRITE default t.show() method with new one
	t.hide=function(){dhtmlmodal.close(this)} //OVERWRITE default t.hide() method with new one
return t
},


loadveil:function(){
	var d=dhtmlwindow
	d.getviewpoint()
	this.docheightcomplete=(d.standardbody.offsetHeight>d.standardbody.scrollHeight)? d.standardbody.offsetHeight : d.standardbody.scrollHeight
	this.interVeil.style.width=d.docwidth+"px" //set up veil over page
	this.interVeil.style.height=this.docheightcomplete+"px" //set up veil over page
	this.interVeil.style.left=0 //Position veil over page
	this.interVeil.style.top=0 //Position veil over page
	this.interVeil.style.visibility="visible" //Show veil over page
	this.interVeil.style.display="block" //Show veil over page
},

adjustveil:function(){ //function to adjust veil when window is resized
	if (this.interVeil && this.interVeil.style.display=="block") //If veil is currently visible on the screen
		this.loadveil() //readjust veil
},


close:function(t){ //user initiated function used to close modal window
	t.contentDoc=(t.contentarea.datatype=="iframe")? window.frames["_iframe-"+t.id].document : t.contentarea //return reference to modal window DIV (or document object in the case of iframe
	var closewinbol=dhtmlwindow.close(t)
	if (closewinbol){ //if var returns true
		this.veilstack--
		if (this.veilstack==0) //if this is the only modal window visible on the screen, and being closed
			this.interVeil.style.display="none"
 }
},

forceclose:function(t){ //function attached to default "close" icon of window to bypass "onclose" event, and just close window
	dhtmlwindow.rememberattrs(t) //remember window's dimensions/position on the page before closing
	t.style.display="none"
	this.veilstack--
		if (this.veilstack==0) //if this is the only modal window visible on the screen, and being closed
			this.interVeil.style.display="none"
},

show:function(t){
	dhtmlmodal.veilstack++
	dhtmlmodal.loadveil()
	dhtmlwindow.show(t)
}
} //END object declaration


document.write('<div id="interVeil"></div>')
dhtmlwindow.addEvent(window, function(){if (typeof dhtmlmodal!="undefined") dhtmlmodal.adjustveil()}, "resize")

// DHTML WINDOW & MODAL WINDOW  = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

//RUZEE BORDERS =================================================================================================

/*
cssQuery, version 2.0.2 (2005-08-19)
Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
License: http://creativecommons.org/licenses/LGPL/2.1/
Packed by Steffen Rusitschka; included modules: css level2 and standard.
*/
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[(function(e){return d[e]})];e=(function(){return'\\w+'});c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('6 B=7(){6 1j="2.0.2ruzee";6 $23=/\\s*,\\s*/;6 B=7($9,$$a){6 $c=[];6 $1h=o.2q.1Q&&!$$a;6 $1k=($$a)?($$a.2g==1t)?$$a:[$$a]:[z];6 $$u=14($9).1w($23),i;m(i=0;i<$$u.p;i++){$9=1q($$u[i]);b(P&&$9.Z(0,3).1R("")==" *#"){$9=$9.Z(2);$$a=24([],$1k,$9[1])}1s $$a=$1k;6 j=0,$I,$x,$o,$M="";H(j<$9.p){$I=$9[j++];$x=$9[j++];$M+=$I+$x;$o="";b($9[j]=="("){H($9[j++]!=")"&&j<$9.p){$o+=$9[j]}$o=$o.Z(0,-1);$M+="("+$o+")"}$$a=($1h&&O[$M])?O[$M]:1u($$a,$I,$x,$o);b($1h)O[$M]=$$a}$c=$c.2i($$a)}1S B.2k;8 $c};B.1B=7(){8"7 B() {\\n  [1j "+1j+"]\\n}"};6 O={};B.1Q=R;B.2l=7($9){b($9){$9=1q($9).1R("");1S O[$9]}1s O={}};6 28={};6 1g=R;B.2m=7($J,$15){b(1g)1f("$15="+21($15));28[$J]=17 $15()};B.2n=7($F){8 $F?1f($F):l};6 u={};6 L={};6 t={c:/\\[([\\w-]+(\\|[\\w-]+)?)\\s*(\\W?=)?\\s*([^\\]]*)\\]/};6 E=[];u[" "]=7($f,$a,$k,$h){6 $5,i,j;m(i=0;i<$a.p;i++){6 $10=T($a[i],$k,$h);m(j=0;($5=$10[j]);j++){b(D($5)&&16($5,$h))$f.q($5)}}};u["#"]=7($f,$a,$v){6 $5,j;m(j=0;($5=$a[j]);j++)b($5.v==$v)$f.q($5)};u["."]=7($f,$a,$N){$N=17 1M("(^|\\\\s)"+$N+"(\\\\s|$)");6 $5,i;m(i=0;($5=$a[i]);i++)b($N.d($5.N))$f.q($5)};u[":"]=7($f,$a,$1V,$o){6 $d=L[$1V],$5,i;b($d)m(i=0;($5=$a[i]);i++)b($d($5,$o))$f.q($5)};L["2p"]=7($5){6 $z=X($5);b($z.1m)m(6 i=0;i<$z.1m.p;i++){b($z.1m[i]==$5)8 18}};L["2B"]=7($5){};6 D=7($5){8($5&&$5.1v==1&&$5.k!="!")?$5:1T};6 1d=7($5){H($5&&($5=$5.2s)&&!D($5))1W;8 $5};6 12=7($5){H($5&&($5=$5.2t)&&!D($5))1W;8 $5};6 1Z=7($5){8 D($5.1Y)||12($5.1Y)};6 2v=7($5){8 D($5.1X)||1d($5.1X)};6 U=7($5){6 $U=[];$5=1Z($5);H($5){$U.q($5);$5=12($5)}8 $U};6 P=18;6 1o=7($5){6 $z=X($5);8(2y $z.20=="2A")?/\\.26$/i.d($z.2C):2D($z.20=="2F 2G")};6 X=7($5){8 $5.2H||$5.z};6 T=7($5,$k){8($k=="*"&&$5.1l)?$5.1l:$5.T($k)};6 1b=7($5,$k,$h){b($k=="*")8 D($5);b(!16($5,$h))8 R;b(!1o($5))$k=$k.2J();8 $5.k==$k};6 16=7($5,$h){8!$h||($h=="*")||($5.2K==$h)};6 1J=7($5){8 $5.1K};7 24($f,$a,v){6 $c,i,j;m(i=0;i<$a.p;i++){b($c=$a[i].1l.2L(v)){b($c.v==v)$f.q($c);1s b($c.p!=1T){m(j=0;j<$c.p;j++){b($c[j].v==v)$f.q($c[j])}}}}8 $f};b(![].q)1t.29.q=7(){m(6 i=0;i<o.p;i++){l[l.p]=o[i]}8 l.p};6 $19=/\\|/;7 1u($$a,$I,$x,$o){b($19.d($x)){$x=$x.1w($19);$o=$x[0];$x=$x[1]}6 $f=[];b(u[$I]){u[$I]($f,$$a,$x,$o)}8 $f};6 $1y=/^[^\\s>+~]/;6 $$1z=/[\\s#.:>+~()@]|[^\\s#.:>+~()@]+/g;7 1q($9){b($1y.d($9))$9=" "+$9;8 $9.c($$1z)||[]};6 $1A=/\\s*([\\s>+~(),]|^|$)\\s*/g;6 $22=/([\\s>+~,]|[^(]\\+|^)([#.:@])/g;6 14=7($9){8 $9.C($1A,"$1").C($22,"$1*$2")};6 1p={1B:7(){8"\'"},c:/^(\'[^\']*\')|("[^"]*")$/,d:7($y){8 l.c.d($y)},1D:7($y){8 l.d($y)?$y:l+$y+l},1C:7($y){8 l.d($y)?$y.Z(1,-1):$y}};6 1U=7($1F){8 1p.1C($1F)};6 $1G=/([\\/()[\\]?{}|*+-])/g;7 1a($y){8 $y.C($1G,"\\\\$1")};u[">"]=7($f,$a,$k,$h){6 $5,i,j;m(i=0;i<$a.p;i++){6 $10=U($a[i]);m(j=0;($5=$10[j]);j++)b(1b($5,$k,$h))$f.q($5)}};u["+"]=7($f,$a,$k,$h){m(6 i=0;i<$a.p;i++){6 $5=12($a[i]);b($5&&1b($5,$k,$h))$f.q($5)}};u["@"]=7($f,$a,$1H){6 $d=E[$1H].d;6 $5,i;m(i=0;($5=$a[i]);i++)b($d($5))$f.q($5)};L["2c-2d"]=7($5){8!1d($5)};L["1e"]=7($5,$F){$F=17 1M("^"+$F,"i");H($5&&!$5.Q("1e"))$5=$5.2e;8 $5&&$F.d($5.Q("1e"))};t.1O=/\\\\:/g;t.1i="@";t.K={};t.C=7($c,$r,$h,$1N,$A){6 $13=l.1i+$c;b(!E[$13]){$r=l.1P($r,$1N||"",$A||"");E[$13]=$r;E.q($r)}8 E[$13].v};t.1L=7($9){$9=$9.C(l.1O,"|");6 $c;H($c=$9.c(l.c)){6 $C=l.C($c[0],$c[1],$c[2],$c[3],$c[4]);$9=$9.C(l.c,$C)}8 $9};t.1P=7($1n,$d,$A){6 $S={};$S.v=l.1i+E.p;$S.J=$1n;$d=l.K[$d];$d=$d?$d(l.Q($1n),1U($A)):R;$S.d=17 2r("e","8 "+$d);8 $S};t.Q=7($J){27($J.2u()){G"v":8"e.v";G"2z":8"e.N";G"m":8"e.2E";G"25":b(P){8"21((e.2I.c(/25=\\\\1r?([^\\\\s\\\\1r]*)\\\\1r?/)||[])[1]||\'\')"}}8"e.Q(\'"+$J.C($19,":")+"\')"};t.K[""]=7($r){8 $r};t.K["="]=7($r,$A){8 $r+"=="+1p.1D($A)};t.K["~="]=7($r,$A){8"/(^| )"+1a($A)+"( |$)/.d("+$r+")"};t.K["|="]=7($r,$A){8"/^"+1a($A)+"(-|$)/.d("+$r+")"};6 1I=14;14=7($9){8 1I(t.1L($9))};P=1f("R;/*@2f@b(@\\2h)P=18@2j@*/");b(!P){T=7($5,$k,$h){8 $h?$5.2o("*",$k):$5.T($k)};16=7($5,$h){8!$h||($h=="*")||($5.2w==$h)};1o=z.1x?7($5){8/26/i.d(X($5).1x)}:7($5){8 X($5).2a.k!="2b"};1J=7($5){8 $5.Y||$5.1K||1c($5)};7 1c($5){6 $Y="",$V,i;m(i=0;($V=$5.2x[i]);i++){27($V.1v){G 11:G 1:$Y+=1c($V);1E;G 3:$Y+=$V.2M;1E}}8 $Y}}1g=18;8 B}();',62,173,'|||||element|var|function|return|selector|from|if|match|test||results||namespace|||tagName|this|for||arguments|length|push|attribute||AttributeSelector|selectors|id||filter|string|document|value|cssQuery|replace|thisElement|attributeSelectors|code|case|while|token|name|tests|pseudoClasses|cacheSelector|className|cache|isMSIE|getAttribute|false|attributeSelector|getElementsByTagName|childElements|node||getDocument|textContent|slice|subset||nextElementSibling|key|parseSelector|script|compareNamespace|new|true|NAMESPACE|regEscape|compareTagName|_getTextContent|previousElementSibling|lang|eval|loaded|useCache|PREFIX|version|base|all|links|propertyName|isXML|Quote|_toStream|x22|else|Array|select|nodeType|split|contentType|STANDARD_SELECT|STREAM|WHITESPACE|toString|remove|add|break|text|ESCAPE|attributeSelectorID|_parseSelector|getTextContent|innerText|parse|RegExp|compare|NS_IE|create|caching|join|delete|null|getText|pseudoClass|continue|lastChild|firstChild|firstElementChild|mimeType|String|IMPLIED_ALL|COMMA|_msie_selectById|href|xml|switch|modules|prototype|documentElement|HTML|first|child|parentNode|cc_on|constructor|x5fwin32|concat|end|error|clearCache|addModule|valueOf|getElementsByTagNameNS|link|callee|Function|previousSibling|nextSibling|toLowerCase|lastElementChild|prefix|childNodes|typeof|class|unknown|visited|URL|Boolean|htmlFor|XML|Document|ownerDocument|outerHTML|toUpperCase|scopeName|item|nodeValue'.split('|'),0,{}))

/**
 * RuzeeBorders 0.13
 * (c) 2006 Steffen Rusitschka <steffen@rusitschka.de>
 *
 * RuzeeBorders is freely distributable under the terms of an MIT-style license.
 * For details, see http://www.ruzee.com/
 */

var RUZEE=window.RUZEE||{};
RUZEE.userAgent=navigator.userAgent.toLowerCase();
RUZEE.isIE=typeof window.RUZEE.isIE != 'undefined'
  ?window.RUZEE.isIE
  :RUZEE.userAgent.indexOf('msie')>=0
    && RUZEE.userAgent.indexOf('opera')==-1;
RUZEE.isStrict=typeof window.RUZEE.isStrict != 'undefined'
  ?window.RUZEE.isStrict
  :(document.compatMode?document.compatMode!='BackCompat':RUZEE.userAgent.indexOf('safari')==-1?false:true);

RUZEE.Borders={

  /**
   * Set to false to not draw the borders automatically on
   * domload when RUZEE.Events are available.
   */
  autoRender:true,

  /** Add mapping rules to be executed on render(). */
  add:function(mappings){
    for(rule in mappings){
      var rules=rule.split(',');
      for(var i=0; i<rules.length; ++i){
        var r=rules[i].replace(/^\s+|\s+$/,'');
        var ms=RUZEE.Borders.mappings[r]||{};
        for (m in mappings[rule]) ms[m]=mappings[rule][m];
        RUZEE.Borders.mappings[r]=ms;
      }
    }
  },

  /**
   * Render all added mapping rules into the DOM
   * If RUZEE.Events is not available, this method MUST be called in the
   * window.onload method (or with a similar technique)!
   * Note: Since v0.12, this method is asynchronous! If you need to do
   * stuff AFTER the rendering finished, do it inside the function you passed
   * in via the onfinished parameter.
   */
  render:function(onfinished){
    if(onfinished) RUZEE.Borders.onfinished=onfinished;
    var start=new Date().getTime();
    for(rule in RUZEE.Borders.mappings){
      var e=RUZEE.Borders.cssQuery(rule);
      var b=new RUZEE.Borders.Border(RUZEE.Borders.mappings[rule]);
      delete RUZEE.Borders.mappings[rule];
      b.calc(e);
      // if we are rendering for more than 3 seconds, give Firefox some time to get
      // rid of the "unresponsive script" message.
      if(new Date().getTime()-start>3000){
        setTimeout('RUZEE.Borders.render()',0);
        return;
      }
    }
    RUZEE.Borders.renderCalcs();
    if(RUZEE.Borders.onfinished) RUZEE.Borders.onfinished();
  },

  /** The Border class constructor */
  Border:function(d){
    var rad=d.cornerRadius||8;
    this.shadowShift=0;
    this.setEdges(d.edges||'lrtb');
    this.height=d.height||0;
    var b=null;
    switch(d.borderType){
    case 'simple':
      this.cornerRadius=this.shadowRadius=this.shadowPadding=rad;
      this.coShadowS='000';
      break;
    case 'shadow':
      var sw=d.shadowWidth||8;
      this.cornerRadius=rad;
      this.shadowRadius=rad+sw*2;
      this.shadowPadding=rad+sw;
      this.shadowShift=Math.round(sw/2);
      this.coShadowS=d.shadowColor||'000';
      break;
    case 'fade':
      this.cornerRadius=this.shadowPadding=1;
      this.shadowRadius=rad;
      this.coShadowS='.fade';
      break;
    case 'glow':
      this.cornerRadius=this.shadowPadding=rad;
      this.shadowRadius=rad+(d.glowWidth||rad);
      this.coShadowS=d.glowColor||'fff';
      break;
    default:
      alert('Unknown borderType: '+d.borderType);
    }
  },

  // ---- internal fields and methods ----

  /** the mappings: 'CSS rule' -> Border */
  mappings:{},

  /** The corner cache */
  cache:{},

  /** The completed calulations to render */
  calcs:[],

  /** if Dean Edward's cssQuery is available, use it */
  cssQuery:function(s){
    var c=s.charAt(0);
    if(c=='#'&&!(/\s/.test(s))) return [ document.getElementById(s.substr(1)) ];
    if(window.cssQuery) return window.cssQuery(s);

    alert("Don't know what to do with '"+s+"' Did you forget to include cssquery?");
    return [];
  },

  /** Add a completed calculation */
  addCalc:function(calc){
    RUZEE.Borders.calcs.push(calc);
  },

  renderCalcs:function(){
    for(var i=0; i<RUZEE.Borders.calcs.length; ++i){
      RUZEE.Borders.calcs[i]();
    }
    RUZEE.Borders.calcs=[];
  }
};

/** The Border class */
RUZEE.Borders.Border.prototype={

  /** Set the background image for element e to position x,y */
  setBgImg:function(e,x,y){
    if(!this.imgBgInURL) return;
    e.style.backgroundImage=this.imgBgInURL;
    x=-x;y=-y;
    e.style.backgroundPosition=x+'px '+y+'px';
    if(this.imgBgInRepeat) e.style.backgroundRepeat=this.imgBgInRepeat;
  },

  /** Create a DIV with width w, height h, background color bg, overflow o */
  crDiv:function(w,h,bg,o){
    var d=RUZEE.isXHTML
      ?document.createElementNS('http://www.w3.org/1999/xhtml','div')
      :document.createElement('div');
    d.style.padding=d.style.margin='0px';
    d.style.display='block';
    d.style.border='none';
    d.style.width=w?w:'auto';
    if(h) { d.style.height=h; d.style.fontSize=h; }
    if(!bg) bg='transparent';
    d.style.background=bg;
    if(o) d.style.overflow=o;
    return d;
  },

  /** Create wrapper DIV around element c */
  addLR:function(c,co,w,h,bgx,bgy){
    var e=this.crDiv(null,h,co);
    if(typeof bgx!='undefined') this.setBgImg(e,bgx,bgy);
    if(!w) w='1px';
    c.style.margin='0px '+(this.isR?w:'0px')+' 0px '+(this.isL?w:'0px');
    e.appendChild(c);
    return e;
  },

  /** Create the top (top==true) or bottom (top==false) of the border */
  crTB:function(top){
    var ca=RUZEE.Borders.cache[this.cacheID+'.'+top];
    if(ca){
      if(top){
        this.psT=ca.ps;
        this.inSh=ca.inSh;
      }else{
        this.psB=ca.ps;
      }
      return ca.el.cloneNode(true);
    }
    var sh=top?-this.shadowShift:this.shadowShift;
    var cxc=this.shadowPadding-this.cornerRadius-1;
    var cxb=cxc;
    var cxe=cxc+this.cornerRadius;
    var exb=0;
    var exe=cxc-1;
    var syc=this.cornerRadius-this.shadowPadding+sh+1;
    var yb,ye;
    if(top){
      if(!this.isT){
        this.psT=0;
        return;
      }
      yb=syc+this.shadowRadius-1;
      ye=syc-1;
      yi=-1;
      this.inSh=syc-1;
      this.psT=yb-ye;
    }else{
      if(!this.isB) {
        this.psB=0;
        return;
      }
      yb=syc<0?syc:0;
      ye=syc+this.shadowRadius;
      yi=1;
      this.psB=ye-yb;
    }
    var cwb=this.wBorder;
    if(cwb==0) cwb=1;

    var e=this.crDiv(null, Math.abs(yb-ye)+'px',null,'hidden');
    for(var y=yb; y!=ye; y+=yi){
      var co;
      if(y<=this.cornerRadius-cwb){
        co=this.coBgIn;
      }else if(y<=this.cornerRadius){
        co=this.coBorder;
      }else if(y-syc<0){
        co=this.coShadow;
      }else{
        co=rzBlend(this.coShadow,this.coBgOut,(y-syc)/this.shadowRadius);
      }
      var line=this.crDiv(null,'1px',rzC2S(co),'hidden');
      var fstLine=line;
      var xbg=null;
      for(var x=0; x<this.shadowRadius; ++x){
        var isIn=false, setBgImg=false;
        var sd, out=0;
        if(y<syc){
          sd=x;
        }else{
          sd=Math.sqrt(Math.sqr(x)+Math.sqr(y-syc));
        }
        if(this.shadowRadius>this.cornerRadius && sd<=this.shadowRadius){
          co=rzBlend(this.coShadow, this.coBgOut, sd/this.shadowRadius);
        }else{
          co=this.coBgOut;
          out++;
        }
        if(y<=this.cornerRadius){
          if(x>=exb && x<=exe){
            if(y>this.cornerRadius-cwb){
              co=this.coBorder;
            }else{
              isIn=true;
            }
          }else if(x>=cxb && x<=cxe){
            var cd=Math.sqrt(Math.sqr(x-cxc)+Math.sqr(y))-this.cornerRadius;
            if(y<0){
              if(x-cxc>this.cornerRadius-this.wBorder){
                co=this.coBorder;
              }else{ 
                isIn=true;
              }
            }else if(cd<-cwb){
              isIn=true;
            }else if(cd<-cwb+1){
              // first on border! do bgimg
              if(top&&this.imgBgInURL){
                setBgImg=true;
              }else
                co=rzBlend(this.coBgIn,this.coBorder,cd+cwb);
            }else if(cd<0){
              co=this.coBorder;
            }else if(cd<=1){
              co=rzBlend(this.coBorder,co,cd);
            }else{
              out++;
            }
          }
        }else{
          out++;
        }
        if(!isIn&&line==fstLine&&y<=this.cornerRadius-cwb&&top){
          this.setBgImg(fstLine,this.shadowRadius-x,yb-y);
        }
        if(out>1){
          line=this.addLR(line,'transparent',(this.shadowRadius-x)+'px');
          x=this.shadowRadius; // done
        }else{
          if(!isIn){
            // fix a strange IE bug where the 12ths recursion seems to get lost...
            if(RUZEE.isIE&&x==this.shadowRadius-12) line=this.addLR(line);
            line=this.addLR(line,rzC2S(co));
          }
          if(setBgImg) this.setBgImg(line,this.shadowRadius-x,yb-y+1);
        }
      }
      e.appendChild(line);
    }
    var ce={ el:e, ps:top?this.psT:this.psB };
    if(top) ce.inSh=this.inSh;
    RUZEE.Borders.cache[this.cacheID+'.'+top]=ce;
    return e;
  },

  /** Create the left and right of the border */
  crLR:function(e){
    var coBgInS=rzC2S(this.coBgIn);
    var coBS=rzC2S(this.coBorder);
    if(this.wBorder>0) e=this.addLR(e,coBS,this.wBorder+'px');
    for(var x=this.shadowPadding; x<this.shadowRadius; ++x){
      coS=rzC2S(rzBlend(this.coShadow,this.coBgOut,x/this.shadowRadius));
      e=this.addLR(e,coS);
    }
    return e;
  },

  setEdges:function(ed){
    ed=ed?ed.toLowerCase():'lrtb';
    this.isL=ed.indexOf('l')>=0;
    this.isR=ed.indexOf('r')>=0;
    this.isT=ed.indexOf('t')>=0;
    this.isB=ed.indexOf('b')>=0;
  },

  /** Calculate the border around e */
  calc:function(e){
    RUZEE.isXHTML=typeof window.RUZEE.isXHTML != 'undefined'
      ?window.RUZEE.isXHTML
      :(/html\:/.test(document.getElementsByTagName('body')[0].nodeName));

    if(!e) return;
    if(e.constructor==Array){
      for(var i=0; i<e.length; ++i) this.calc(e[i]);
      return;
    }
    this.inSh=0;

    // Get the bg image
//     this.imgBgInURL=rzGetStyle(e,'background-image',false,null);
    this.imgBgInURL=rzGetStyle(e,'background-image');
    if(this.imgBgInURL&&this.imgBgInURL=='none') this.imgBgInURL=null;
    if(this.imgBgInURL){
//       this.imgBgInRepeat=rzGetStyle(e,'background-repeat',false,null);
      this.imgBgInRepeat=rzGetStyle(e,'background-repeat');
    }
//     this.coBgIn=rzS2C(rzGetStyle(e,'background-color'),'#ffffff');
    this.coBgIn=rzS2C(rzGetBg(e));
//     this.coBgOut=rzS2C(rzGetStyle(e.parentNode,'background-color'),'#ffffff');
    this.coBgOut=rzS2C(rzGetBg(e.parentNode));
    var borderCSS='border-'+(this.isT?'top-':'bottom-');
    var bs=rzGetStyle(e,borderCSS+'style','none');
    if(bs && bs!='' && bs!='none' && bs!='hidden'){
      this.coBorder=rzS2C(rzGetStyle(e,borderCSS+'color','black'));
      this.wBorder=rzPX2I(rzGetStyle(e,borderCSS+'width','1px'));
    }else{
      this.coBorder=this.coBgIn;
      this.wBorder=0;
    }
    this.coShadow=this.coShadowS=='.fade'?this.coBorder:rzS2C(this.coShadowS);

    this.cacheID=
      rzC2S(this.coBgIn)+'.'+rzC2S(this.coBgOut)+'.'+
      rzC2S(this.coBorder)+'.'+rzC2S(this.coShadow)+'.'+
      this.wBorder+'.'+this.isL+this.isR+this.isT+this.isB+'.'+
      this.cornerRadius+'.'+this.shadowRadius+'.'+
      this.shadowPadding+'.'+this.shadowShift+'.'+
      this.imgBgInURL+'.'+this.imgBgInRepeat;

    var wr=this.crDiv();
    var cwr=this.crDiv();

    this.psT=0;
    this.psB=0;
    if(this.isT) wr.appendChild(this.crTB(true));
    wr.appendChild(this.crLR(cwr));
    if(this.isB) wr.appendChild(this.crTB(false));
    var psLR=this.shadowRadius-this.shadowPadding+this.wBorder;
    var psL=this.isL?psLR:0;
    var psR=this.isR?psLR:0;
    var isTB=this.isT&&this.isB;
    if(!isTB)this.inSh=0;
    var psT=isTB?Math.floor((this.psT+this.psB+this.inSh)/2):this.psT+Math.floor(this.inSh/2);
    var psB=this.psB+this.psT+this.inSh-psT;

    var cwrbg=cwr;
    // lift the inner div up if necessary
    if(this.inSh!=0){
      var up1=this.crDiv(); cwr.appendChild(up1);
      var up2=this.crDiv(); up1.appendChild(up2);
      cwr.style.position=up1.style.position='relative';
      up1.style.top=up2.style.marginBottom=this.inSh+'px';
      if(RUZEE.isIE) cwr.style.height='1%';
      cwrbg=up1; cwr=up2;
    }

    this.setBgImg(cwrbg,psL,this.psT+this.inSh);
    cwrbg.style.backgroundColor=rzC2S(this.coBgIn);

    if(RUZEE.isIE){
      e.style.height=cwr.style.height='1%'; // fix IE 3px jog when floated
    }else{
      // work around for other browsers for sebs problem
      var end=this.crDiv(null,'1px');
      end.style.marginBottom='-1px';
      e.appendChild(end);
      cwr.appendChild(end.cloneNode(true));
    }
    if(this.height>0){
      var h=(RUZEE.isStrict?this.height:(this.height-this.psB-this.psT));
      if(h>0) cwr.style.height=h+'px';
    }

    var funcs=[
      rzUpdatePad(e,wr,cwr,'top',psT),
      rzUpdatePad(e,wr,cwr,'bottom',psB),
      rzUpdatePad(e,wr,cwr,'left',psL),
      rzUpdatePad(e,wr,cwr,'right',psR)];

    RUZEE.Borders.addCalc(function(){
      for(var i=0; i<funcs.length; ++i) funcs[i]();
      e.style.background='transparent';
      e.style.backgroundImage='none';
      e.appendChild(wr);
      while (e.childNodes.length>1){
        cwr.appendChild(e.removeChild(e.childNodes[0]));
      }
    });
  },

  /** Render the border around e */
  render:function(e){
    this.calc(e);
    RUZEE.Borders.renderCalcs();
  },

  // DEPRECATED STUFF - WILL BE REMOVED IN ONE OF THE NEXT RELEASES!
  draw:function(e,edges){
    this.setEdges(edges?edges.toLowerCase():'lrtb');
    if(typeof e=='string'){
      if(e.charAt(0)!='.') e='#'+e;
      e=RUZEE.Borders.cssQuery(e);
    }
    this.render(e);
  }
}; // of Border prototype

// add an event handler for render() if RUZEE.Events are available
if(RUZEE.Events){
  RUZEE.Events.add(window,'domload',function(){
    if(RUZEE.Borders.autoRender) RUZEE.Borders.render();
  });
}

// internal tools

Math.sqr=function(x){
  return x*x;
};

function rzCC(s){
  for(var exp=/-([a-z])/; exp.test(s); s=s.replace(exp,RegExp.$1.toUpperCase()));
  return s;
};

function rzGetStyle(e,a,d){
  if(e==null) return d;
  var v=null;
  if(document.defaultView && document.defaultView.getComputedStyle){
    var cs=document.defaultView.getComputedStyle(e,null);
    if(cs && cs.getPropertyValue) v=cs.getPropertyValue(a);
  }
  if(!v && e.currentStyle) v=e.currentStyle[rzCC(a)];
  return v?v:d?d:null;
};

function rzGetBg(e){
  var v=rzGetStyle(e,'background-color');
  // KHTML bug fix: transparent is #000000 - if you want black, use #010101 in your CSS.
  // Safari work around: transparent is 'rgba(0, 0, 0, 0)'
  while (!v || v=='transparent' || v=='#000000' || v=='rgba(0, 0, 0, 0)'){
    if(e==document.body) v='fff'; else {
      e=e.parentNode;
      v=rzGetStyle(e,'background-color');
    }
  }
  return v;
};

function rzPX2I(px){
  if(!px) return 0;
  var p=/\s*(\d\d*)px/.exec(px);
  if(p) return parseInt(p[1]);
  return 0;
};

  /** Update the padding of s depending of the setting of d and subtract subPx */
function rzUpdatePad(org,newo,newi,l,subPx,isSet){
  var padL='padding-'+l; var padCC=rzCC(padL);
  var marL='margin-'+l; var marCC=rzCC(marL);
  var borL='border-'+l+'-width'; var borCC=rzCC(borL);

  var pad=rzGetStyle(org,padL);
  var bor=rzGetStyle(org,borL);
  var r=rzPX2I(pad)+rzPX2I(bor);
  var v=r-subPx;
  v=(v<0?0:v)+'px';

  if(RUZEE.isStrict){
    newo.style[marCC]=(-r)+'px';
    newi.style[padCC]=v;
    return function(){
      org.style[borCC]='0px';
      org.style[padCC]=r+'px';
    };
  }else{
    newi.style[padCC]=v;
    return function(){
      org.style[borCC]=org.style[padCC]='0px';
    };
  }
};

function rzS2C(s,d){
    if (!s) return d?rzS2C(d):[0,0,0,0];
    if (s.charAt(0)=='#') s=s.substr(1,6);
    s=s.replace(/ /g,'').toLowerCase();
    // The CSS 2.1 colors
    var COLORS = {
         aqua:'00ffff', black:'000000', blue:'0000ff', fuchsia:'ff00ff',
         gray:'808080', green:'008000', lime:'00ff00', maroon:'800000',
         navy:'000080', olive:'808000', orange:'ffa500', purple:'800080',
         red:'ff0000', silver:'c0c0c0', teal:'008080', white:'ffffff',
         yellow:'ffff00'
    };
    for (var key in COLORS) if (s==key) s=COLORS[key];

    var p=/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(s);
    if(p) return [parseInt(p[1]),parseInt(p[2]),parseInt(p[3]),parseInt(p[4])];
    var p=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(s);
    if(p) return [parseInt(p[1]),parseInt(p[2]),parseInt(p[3]),255];
    p=/^(\w{2})(\w{2})(\w{2})$/.exec(s);
    if(p) return [parseInt(p[1],16),parseInt(p[2],16),parseInt(p[3],16),255];
    p=/^(\w{1})(\w{1})(\w{1})$/.exec(s);
    if(p) return [parseInt(p[1]+p[1],16),parseInt(p[2]+p[2],16),parseInt(p[3]+p[3],16),255];
    return d?rzS2C(d):[0,0,0,0];
};

function rzC2S(c){
  if(typeof c=='string') return c;
  r='0'+c[0].toString(16);
  g='0'+c[1].toString(16);
  b='0'+c[2].toString(16);
  return '#'
    +r.substring(r.length-2)
    +g.substring(g.length-2)
    +b.substring(b.length-2);
};

function rzBlend(a,b,w){
  return Array(
    Math.round(a[0]+(b[0]-a[0])*w),
    Math.round(a[1]+(b[1]-a[1])*w),
    Math.round(a[2]+(b[2]-a[2])*w),
    Math.round(a[3]+(b[3]-a[3])*w));
};

// DEPRECATED STUFF - WILL BE REMOVED IN ONE OF THE NEXT RELEASES!
function rzCrSimpleBorder(rad){
  return new RUZEE.Borders.Border({ borderType:'simple', cornerRadius:rad });
};

function rzCrShadowBorder(rad,smar,coShadowS){
  return new RUZEE.Borders.Border({
    borderType:'shadow', cornerRadius:rad, shadowWidth:smar, shadowColor:coShadowS });
};

function rzCrFadeBorder(rad){
  return new RUZEE.Borders.Border({ borderType:'fade', cornerRadius:rad });
};

function rzCrGlowBorder(rad,gmar,coGlowS){
  return new RUZEE.Borders.Border({ borderType:'glow', cornerRadius:rad, glowWidth:gmar, glowColor:coGlowS });
};

//RUZEE BORDERS =================================================================================================
document.write("<link rel='shortcut icon' href='favicon.ico'><link rel='icon' type='image/gif' href='animated_favicon1.gif'>");
// ==============================================================================================================

//RUZZE BORDERS -- LAST SCRIPT
RUZEE.Borders.add({
  '.My470': { borderType:'simple', cornerRadius:8},
  '.My160': { borderType:'simple', cornerRadius:6},
  '.MyFloatD': { borderType:'simple', cornerRadius:4}
});

window.onload=function(){
  RUZEE.Borders.render();
};