﻿
//Byter en bilds källbild
function swap(ID,ImgPath)
{
    try
    {
	    document.getElementById(ID).src=ImgPath;
	}
	catch(err)
    {
    }
}

//Sätt ett objekts färg
function color(ID,Color)
{
    try
    {
	    document.getElementById(ID).style.color=Color;
	}
	catch(err)
    {
    }
}

//Byter en länks källa
function swapLink(ID,URL)
{
	document.getElementById(ID).href=URL;
}

function flashObject(moviePath, width, height) {
    return '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + width + '" height="' + height + '">'+
          '<param name="movie" value="' + moviePath  + '" />'+
          '<param name="quality" value="high" />'+
          '<param name="menu" value="false" />'+
          '<param name="wmode" value="opaque" />'+
          '<param name="bgcolor" value="#ffffff" />' +
          '<param name="scale" value="noborder" />' +
          '<param name="allowScriptAccess" value="sameDomain" />' +
          '<embed src="' + moviePath  + '" width="' + width + '" height="' + height + '" wmode="opaque" quality="high" scale="noborder" allowScriptAccess="sameDomain" bgcolor="#ffffff" pluginspage="http://www.adobe.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false"></embed>'+
        '</object>';
}

function audioObject(fileUrl, mimeType) {
    return '<embed src="' + fileUrl + '" width="400" height="20" autoplay="true" loop="false" type="' + mimeType + '"></embed>';
}

function documentWriteln(output) {
    document.writeln(output);
}

