var screenheight = parseInt(window.screen.availHeight ? window.screen.availHeight : window.screen.height);



// Returns the overall X position (in pixels) of any supplied object

function findPosX(obj) {

	var curleft = 0;

	if (obj.offsetParent)

		while (obj.offsetParent) { curleft += obj.offsetLeft; obj = obj.offsetParent; }

	else if (obj.x)

		curleft += obj.x;

	return curleft;

}



// Returns the overall Y position (in pixels) of any supplied object

function findPosY(obj) {

	var curtop = 0;

	if (obj.offsetParent)

		while (obj.offsetParent) { curtop += obj.offsetTop; obj = obj.offsetParent; }

	else if (obj.y)

		curtop += obj.y;

	return curtop;

}



function moveObjTo( a, b ){

	a.style.top = findPosY( b );

	a.style.left = findPosX( b );

}



preload = function(){

	for( var i=0; i<arguments.length; i++){

		img = new Image();

		img.src = arguments[i];

	}

}



/* Dynamic TD Height */

var offset = 200;

var height = (window.screen.availHeight ? window.screen.availHeight : window.screen.height);

function dynTD(width,cell_class){	

	document.writeln('<td width="' + width + '" height="' + ( height - (arguments.length > 2 ? arguments[2] : 0 ))  + '" class="' + cell_class + '" valign="top">')

}



var oversuffix = "_on";



rollover = function( img ){

	if( !img) return false;

	var src = img.src;

	img.src = src.substring(0,src.length-4) + oversuffix +  src.substring(src.length-4, src.length) 

}

rollout = function( img ){

	if( !img) return false;

	var src = img.src;

	if( src.indexOf( oversuffix ) < 0 );

	img.src = src.substring(0,src.indexOf( oversuffix )) + src.substring(src.length-4, src.length);

}

preload = function(){

	for( var i=0; i<arguments.length; i++){

		img = new Image();

		img.src = arguments[i];

	}

}



launchClip = function( path )

{

	var win = window.open( path, "clip", "height=350,width=440,scrollbars=no" );

}