// JavaScript Document





// setStyleById: given an element id, style property and 
// value, apply the style.
// args:
//  i - element id
//  p - property
//  v - value
//
function setStyleById(i, p, v) {
	var n = document.getElementById(i);
	n.style[p] = v;
}

// setStyleByClass: given an element type and a class selector,
// style property and value, apply the style.
// args:
//  t - type of tag to check for (e.g., SPAN)
//  c - class name
//  p - CSS property
//  v - value
var ie = (document.all) ? true : false;

function setStyleByClass(t,c,p,v){
	var elements;
	if(t == '*') {
		// '*' not supported by IE/Win 5.5 and below
		elements = (ie) ? document.all : document.getElementsByTagName('*');
	} else {
		elements = document.getElementsByTagName(t);
	}
	for(var i = 0; i < elements.length; i++){
		var node = elements.item(i);
		for(var j = 0; j < node.attributes.length; j++) {
			if(node.attributes.item(j).nodeName == 'class') {
				if(node.attributes.item(j).nodeValue == c) {
					eval('node.style.' + p + " = '" +v + "'");
				}
			}
		}
	}
}

//set visibility and reduce width of close bar by amount of padding
function setPosition(theDiv, theOut, theIn)
{
	theDiv = document.getElementById(theDiv);
	theDiv.style.right = (theDiv.style.right == theIn) ? theOut : theIn;	
}



function doMail () {
	var theAddr=String.fromCharCode(114,101,99,101,112,116,105,111,110,64,109,111,118,105,110,103,119,101,115,116,101,110,100,46,99,111,46,117,107 );
	return theAddr;
	}


//window.onresize=doResize2;
function setDivHeights(){
	var theHeight= Math.max(document.documentElement.clientHeight, document.body.clientHeight);
	theHeight=theHeight-100;
	//setStyleById('gspc_outer', 'height', theHeight+'px');
	setStyleById('gspc_inner', 'height', theHeight-32+'px');//33
	setStyleById('gspciframe2', 'height', theHeight-132+'px');//35
	//setStyleById('gspciframe', 'height', theHeight-132+'px');//35
	document.body.style.overflow = 'hidden';//Hide Scrollbars
}
