// JavaScript Document

//swfobject



//spry functions
function showDoc(pageURL) {
	var w = 850;
	var h = 600;
	var left = (screen.width/2)-(w/2);
	var top = (screen.height/2)-(h/2);
	var targetWin = window.open (pageURL, 'document', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
} 

function openContact(){
	document.getElementById("contact").innerHTML = "<div id='contactSwf'></div>"
	swfobject.embedSWF("contact.swf", "contactSwf", "311", "225", "9.0.115", "expressInstall.swf", flashvars, flashparams, flashattributes);
	//alert("Contact");
}

function closeContact(){
	//document.getElementById("contact").innerHTML = "";
	swfobject.removeSWF("contactSwf");
}


//External Interface
function callExternalInterface(val) {
	/* Call a function registered as callPlayBall in the SWF named myMovie. */
	getMovieName("flashmod").sendToActionScript(val);
	//alert("kissit");
}
/* This utility function resolves the string movieName to a Flash object reference based on browser type. */
function getMovieName(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName]
	}
	else {
		return document[movieName]
	}
}

//old code
/*
function MM_effectAppearFade(targetElement, duration, from, to, toggle)
{
	Spry.Effect.DoFade(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}

//voice functions
function showDoc(swf){
	document.getElementById("docviewer").innerHTML = "<div id='workbkg' onclick='javascript:removeDoc()'></div><div id='closebtnarea' onclick='javascript:removeDoc()'><img src='img/closebtn.jpg' width='52' height='15' alt='close button' onclick='javascript:removeDoc()' /></div><div id='workborder'><div id='workimg'></div></div>";
	swfobject.embedSWF(swf, "workimg", "800", "640", "9.0.115", "expressInstall.swf", flashvars, flashparams, flashattributes);
	MM_effectAppearFade('workbkg', 500, 0, 80, false);
}

function removeDoc(){
	//alert("Brandon");
	document.getElementById("docviewer").innerHTML = "";
	//swfobject.removeSWF("docviewer");
}
*/