function callExternalInterface(str, string_type) {
    if (string_type == "video") {
		getMovieName("gallery").callWriteText(str, string_type);
	} else if(string_type == "null") {
		getMovieName("gallery").callWriteText(str, string_type);
	} 
}

/* 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];
    }
}

