// RANDOM NUMBER GENERATOR
// Works: IE4+, NS4+, Opera

	function randNum (num) {
		var now = new Date();
		var rand = Math.round(num * Math.cos(now.getTime()));
		if (rand < 0) rand = - rand; 
		if (rand == 0) rand++;
		return rand;
	}


// ANTI-SPAM
// Works: IE4+, NS6+, Opera

	function antispam(name,domain) {
    	document.location = "mailto:" + name + "@" + domain;
	}


function Swf(swf,w,h,bg,v) {
    this._vars = null;
    this._swf = swf;
    this._w = w;
    this._h = h;
    this._bg = bg;
    this._v = v;
}
Swf.prototype.flashvars = function(str) {
    var uri = top.window.location.href;
    this._vars = str + "&request_uri=" + uri;
}
Swf.prototype.write = function() {
    var out = "";
    if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) {
        out += '<embed src="'+this._swf+'" width="'+this._w+'" height="'+this._h+'" bgcolor="'+this._bg+'" wmode="transparent"';
        out += ' flashvars="'+this._vars+'"';
        out += ' quality="high" menu="false" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"';
        out += ' />'
    } else {
        out += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';
        out += ' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+this._v+'"';
        out += ' width="'+this._w+'" height="'+this._h+'">';
		out += '<param name="wmode" value="transparent" />';
        out += ' <param name="movie" value="'+this._swf+'" />';
        out += ' <param name="bgcolor" value="'+this._bg+'" />';
        out += ' <param name="flashvars" value="'+this._vars+'" />'
        out += ' <param name="allowScriptAccess" value="sameDomain" />';
        out += ' <param name="quality" value="high" />';
        out += ' <param name="menu" value="false" />';
        out += '</object>';
    }
    document.write(out);
}
