// SeeCreature Design V 1.0
// 

window.onload = checkIphone;
	function checkIphone() {
		var thisbrowser = navigator.platform;
		if (thisbrowser == "iPhone") {
			findh2();
			
			}
		}
	function findh2() {
		x = document.getElementsByTagName('h2');
		y = x[0].getAttribute('title');
		//y = x.length;
		//y = x[0].className == "h2"
		for (var i=0;i<x.length;i++) {
			x[i].innerHTML = x[i].getAttribute('title');
		}
		//a = x[1].innerHTML;
		
		//alert(navigator.userAgent);
		}





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 EmailObject ( email, domain ) 
{
	
	document.writeln ( ' <a href="mailto:' + email + '@' + domain + '">' + email + '@' + domain +'</a>')
}
function EmailObject2 ( email, domain, txt, subject, txtSubject ) 
{
	document.writeln ( ' <a href="mailto:' + email + '@' + domain + '">' + txt +'</a>')
} 
var altHome = '<div style="height: 615px;background-color:#FFF;width: 900px;">\n' +
					'<img src="/assets/images/no-flash-01.jpg" alt="" /><img src="/assets/images/no-flash-02.jpg" alt="" /><br />\n' +
					'<div class="left"><img src="/assets/images/no-flash-03.jpg" alt="" /></div><div class="left"><img src="/assets/images/no-flash-04.jpg" alt="" /></div>\n' +
					'<div class="left"><img src="/assets/images/no-flash-05.jpg" border="0" usemap="#Map2" /><br />\n' +
					  '<map name="Map2">\n' +
						'<area shape="rect" coords="106,179,214,244" href="/castiva/">\n' +
						'<area shape="rect" coords="221,145,317,259" href="/cooling/">\n' +
						'<area shape="poly" coords="280,141,317,141,320,251,378,251,377,102,276,102" href="/warming/">\n' +
					  '</map>\n' +
        			'</div>\n' +
					'<div class="left"><a href="/professionals/"><img src="/assets/images/no-flash-06.jpg" /></a></div>\n' +
					'<div class="left"><a href="/evaluation/"><img src="/assets/images/no-flash-07.jpg" /></a></div>\n' +
					'<div class="left"><a href="/buy/"><img src="/assets/images/no-flash-08.jpg" /></a></div>\n' +
					'<div class="left"><img src="/assets/images/no-flash-09.jpg" border="0" usemap="#Map" /><br />\n' +
					  '<map name="Map">\n' +
						'<area shape="rect" coords="21,33,234,87" href="/buy/">\n' +
					  '</map>\n' +
					'</div>\n' +
					'<div class="left">\n' +
					'<img src="/assets/images/no-flash-10.jpg" border="0" usemap="#Map3" /><br />\n' +
					'<map name="Map3">\n' +
					  '<area shape="rect" coords="49,8,171,38" href="/refer/">\n' +
					  '<area shape="rect" coords="238,11,422,40" href="/cummunity/">\n' +
					  '<area shape="rect" coords="494,8,612,40" href="/subscribe/">\n' +
					  '<area shape="rect" coords="682,6,867,39" href="http://www.simplehomeremedies.com/" target="_blank">\n' +
					  '<area shape="rect" coords="156,43,728,88" href="http://www.adobe.com/shockwave/download/?promoid=BIOY" target="_blank">\n' +
					'</map>\n' +
					'</div>\n'

var altNav = '<div id="logo"><a href="#"><img src="/assets/images/logo.jpg" alt="" /></a></div>\n' + 
		'<div id="topnav">\n' + 
		'<a href="#" id="top_about">About</a>\n' + 
		'<a href="#" id="top_investors">Investors</a>\n' + 
		'<a href="#" id="top_projects">Projtects</a>\n' + 
		'<a href="#" id="top_news">News</a>\n' + 
		'<a href="#" id="top_contact">Contact</a>\n' + 
		'</div>\n'

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( altHome );//this is a altNav in case of no flash
		} 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>' );
	},
	priceLink: function( price, color, width )
	{
		this.writeObject( '/assets/flash/price.swf?priceset=' + escape( price ) + '&color=' + escape( color ), 162, 30, 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;
	}