﻿window.onload = function()
{
    styleform.init();
}

function formFocus(formElement, defaultText){
    if (document.getElementById(formElement).value == defaultText)
		document.getElementById(formElement).value='';
}

function formBlur(formElement, defaultText){
    if (document.getElementById(formElement).value == '')
		document.getElementById(formElement).value=defaultText;
}

function RunFlash(strFlashFile, strWidth, strHeight, strImgFile)
{
    document.write('<object type="application/x-shockwave-flash" data="' + strFlashFile + '" width="' + strWidth + '" height="' + strHeight + '">\n');
    document.write('<param name="movie" value="' + strFlashFile + '" />\n');
    document.write('<param name="quality" value="high" />\n');
    document.write('<param name="wmode" value="transparent" />\n');
    document.write('<img src="' + strImgFile + '" width="' + strWidth + '" height="' + strHeight + '" alt="Blick Rothenberg" />');
    document.write('</object>\n');
}

var styleform;
if (!styleform)	styleform = {};

styleform.init = function ()
{
	// add nice form styling for non-safari, dom-capable browsers
	if ( navigator.userAgent.toLowerCase().indexOf('safari') < 0  && document.getElementById )
	{
	    // add style sheet if not safari
        var formStyle = document.createElement('link');
        formStyle.rel = 'stylesheet';
        formStyle.type = 'text/css';
        formStyle.media = 'screen';
        formStyle.href = '/App_Themes/cscope/form.css';
        document.getElementsByTagName("head")[0].appendChild(formStyle);
	}
}