// SeeCreature Design V 1.0
// Prtotosite, 07.19.06


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		playNow_over = newImage("../assets/images/playNow-over.gif");
		preloadFlag = true;
	}
}


function showHide(id){
			el = document.getElementById(id);
			el.style.display = (el.style.display == 'block')? 'none' : 'block';
		}

img_on =new Image();  img_on.src ="/assets/images/btn_click-answer.gif"; 
img_off=new Image();  img_off.src="/assets/images/btn_hide-answer.gif"; 

function toggleDisp( id, img )
	{
		var elem = document.getElementById( id );
		elem.style.display = ( elem.style.display == 'block' || elem.style.display == '' ) ? 'none' : 'block';

		if ( elem.style.display == 'block' ) {
			//if (document.images) document.arrow01.src=img_off.src;
			if (document.images) img.src=img_off.src;
		} else {
			//if (document.images) document.arrow01.src=img_on.src;
			if (document.images) img.src=img_on.src;
		}
	}

function Feedback ( email, domain, emailSubject, pageTitle ) 
{
	document.writeln ( ' <a href="mailto:' + email + '@' + domain + '?subject=' + emailSubject + ' ' + pageTitle + '">' +'<img src="/meximae/assets/images/btn_feeback.gif" />' +'</a>')
}

var altHome = ''

FlashObject = 
{
	writeObject: function( url, w, h, bg, trans, altImage, altLink, menu, nav )
	{
		if ( trans )	{	var trans = 'transparent';		} else {			var trans = 'window';		}
		if ( menu )		{	var menu = 'true';				} else {			var menu = 'false';			}
		document.writeln( '<object type="application/x-shockwave-flash" data="' + url + '" width="' + w + '" height="' + h + '">' );
		document.writeln( '<param name=quality value="high">' );
		document.writeln( '<param name=wmode value="' + trans + '">' );
		document.writeln( '<param name=menu value="' + menu + '">' );
		document.writeln( '<param name=movie value="' + url + '">' );
		if ( bg != null ) {
			document.writeln( '<param name=bgcolor value=#' + bg + '>' );
		}
		if ( nav ) {
			document.writeln( altNav );
		} else {
			if ( !altLink ) {
				document.writeln( '<img src="/assets/images/' + altImage + '" />' );
			} else {
				document.writeln( '<a href="' + altLink + '"><img src="/assets/images/' + altImage + '" /></a>' );
			}
		}
		document.writeln( '</object>' );
	},
	emailLink: function( mailbox, color, width )
	{
		this.writeObject( '/assets/flash/email.swf?mailbox=' + escape( mailbox ) + '&color=' + escape( color ), 210, 13, true );
	}
}

function openNewWindow(theURL, winName, winWidth, winHeight){
	var width
	var height
	var leftdist
	var topdist
	width = screen.width;
	height = screen.height;
	leftdist = Math.round((width - winWidth) / 2);
	topdist = Math.round((height - winHeight) / 2);
	window.open(theURL, winName,'width='+winWidth+',height='+winHeight+',top='+topdist+',left='+leftdist+',noresize,resize=0,menubar=0,location=0,scrollbars=0')
	}

function closeWindow(){
	window.close;
	}
	
	
