/*
 * SimpleModal Basic Modal Dialog
 * http://www.ericmmartin.com/projects/simplemodal/
 * http://code.google.com/p/simplemodal/
 *
 * Copyright (c) 2008 Eric Martin - http://ericmmartin.com
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Revision: $Id: basic.js 164 2008-12-02 23:31:54Z emartin24 $
 *
 */

/* $(document).ready(function () {
	$('#basicModal input.basic, #basicModal a.basic').click(function (e) {
		e.preventDefault();
		$('#videoContent').modal();
	});
}); */

$(document).ready(function () {		
	var so = new SWFObject('preview.swf', 'asjs', '322', '72', '9.0', '#282727');
    so.write("flash");
	
});

function funShowVideo(){   
	$('#videoContent').modal();
}

function getFlashMovie(movieName) {
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	//return (isIE) ? window[movieName] : document[movieName];
	return document[movieName];
}

//function callToActionscript(flash, str) {  
//    //alert(str); 
//   //alert(flash); 
//	getFlashMovie(flash).sendToActionscript(str);
//}


function sendToJavaScript(val) {
	document.getElementById("videoContent").style.marginTop = "0px";
	document.getElementById("fullDiv").style.display = "block";
    setTimeout("document['vp'].sendToActionscript('" + val + "')",10);
}

function toggle(id) {

    // hack added to keep from re-writing action script 
    
    if (id == "hidden"){
        id = "videoContent"

    }
    
	var state = document.getElementById(id).style.marginTop;  
	if ((state == '-9000px')||(state == '')) {
		document.getElementById(id).style.marginTop = 'auto';									
	} else {
		document.getElementById(id).style.marginTop = '-9000px';
	    document.getElementById("fullDiv").style.display = "none"; 
	}  
}


