﻿//displays flash file
//Parameters: DivID = 
//			  WIDTH =
//			  HEIGHT =
//			  URL =
//------------------------------------------------------------------------------------
function CreateControl(DivID, WIDTH, HEIGHT, URL) {
    var d = document.getElementById(DivID);
    tmpStr = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + WIDTH + '" height="' + HEIGHT + '">' +
        '<param name="movie" value="' + URL + '">' +
        '<param name="quality" value="high">' +
        '<param name="wmode" value="transparent">' +
        '<embed src="' + URL + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + WIDTH + '" height="' + HEIGHT + '"></embed>' +
      '</object>';
    d.innerHTML = tmpStr
}

/*
on focus fuction
*/
function emptyData(id, DataToClear) {
    if (document.getElementById(id).value == DataToClear) {
        document.getElementById(id).value = '';
    }
}


/*
on blur fuction
*/
function fillData(id, DataToInsert) {
    if (document.getElementById(id).value == '') {
        document.getElementById(id).value = DataToInsert;
    }
}

function BrowserChecker() {
    var agt = navigator.userAgent.toLowerCase();
    var is_mac = (agt.indexOf("mac") != -1);
    var MidX = screen.availWidth / 2;

    if (is_mac) {
        if (agt.indexOf("safari") != -1) {
            document.getElementById('forSafari').style.display = '';
            document.getElementById('menus').style.display = 'none';
        }
        else if (agt.indexOf("mozilla/5.0") != -1) {

        }
        else if (agt.indexOf("opera") != -1) {

        }
        else if (agt.indexOf("ie") != -1) {

        }
    }
    else {
        if (agt.indexOf("safari") != -1) {
            document.getElementById('forSafari').style.display = '';
            document.getElementById('menus').style.display = 'none';
        }
        else if (agt.indexOf("mozilla/5.0") != -1) {

        }
        else if (agt.indexOf("opera") != -1) {

        }
        else if (agt.indexOf("ie") != -1) {

        }
    }
}
