var movies = {};

function stopMainFlash() {
	getFlashMovie("FlashID").stopVideo();
}

function getFlashMovie(movieName) {
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	return (isIE) ? window[movieName] : document[movieName];
}

function changeVideo(xmlPath) {
    if (movies.currentType != undefined) {
        var newValue = '0';

        for (var i = 0; i < xmlPath.length; i++) {
            if (xmlPath.charAt(i).toString() === '.' || !isNaN(xmlPath.charAt(i).toString())) {
                newValue += xmlPath.charAt(i).toString();
            }
        }

        newValue = parseFloat(newValue);

        pageTracker._trackPageview(movies.currentType + '_page' + (!isNaN(newValue) && newValue > 0 ? newValue : 1) + '.html');
    }
    getFlashMovie("FlashID").resetStage(xmlPath);
}

function createAppointment() {
	location.href = "RequestAppointmentForm.aspx";
}

function consultAgent() {
	tb_show(null, "ConsultAgentForm.aspx?height=560&width=425", false);
	stopMainFlash();
}