function writeFlash(url,w,h,id,bg,trans) {
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="' + w + '" height="' + h + '" id="'+ id + '">\n');
document.write('<param name="movie" value="' + url + '" />\n');
document.write('<param name="quality" value="high" />\n');
document.write('<param name="bgcolor" value="' + bg + '" />\n');
if (trans == 1) {document.write('<param name="wmode" value="transparent" />\n');}
document.write('<!--[if !IE]> <-->\n');
document.write('<object data="' + url + '" width="' + w + '" height="' + h + '" type="application/x-shockwave-flash" name="'+ id + '">\n');
document.write('<param name="quality" value="high" />\n');
document.write('<param name="bgcolor" value="' + bg + '" />\n');
document.write('<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer" />\n');
if (trans == 1) {document.write('<param name="wmode" value="transparent" />\n');}
document.write(' FAIL (the browser should render some flash content, not this).\n');
document.write(' </object>\n');
document.write('<!--> <![endif]-->\n');
document.write('</object>\n');
}
function visit(newURL) {
	var site = window.open(newURL, 'website','scrollbars=1, resizable=1, location=1, menubar=1, status=1, toolbar=1, height=768, width=1024');
	site.window.focus();
}

// JavaScript Document
function createRequestObject() {
	var ro;
	var browser = navigator.appName;
	if(browser == "Microsoft Internet Explorer"){
		ro = new ActiveXObject("Microsoft.XMLHTTP");
	}else{
		ro = new XMLHttpRequest();
	}
	return ro;
}

var http = createRequestObject();

function sndReq(page,insert) {
    http.open( 'get', page );
    http.onreadystatechange = function(){
		 if ( http.readyState == 4 ) {
        var response = http.responseText;
        document.getElementById(insert).innerHTML = response;
		}	
	};
    http.send(null);
}

function ConfirmAction(msg)
{
var agree=confirm(msg);
if (agree)
	return true ;
else
	return false ;
}


function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  } 
};

function swapImage(source,target) {
	document.getElementById(target).src = source;
};

function setFormElementValue(input,target){
	document.getElementById(target).value = input;
};
	
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

$(document).ready(function(){
	//background rollovers setup
	$("#mainMenu").children("li").children("a").hover(
		function () {
			var h = "0px -" + $(this).css("height");
			$(this).css("background-position",h);
		},
		function () {
			$(this).css("background-position","0px 0px");
		}
	);
	//mainMenu
	$("#mainMenu").find("li").each(function(){
		$(this).hover(
		function(){
			$(this).children(".sub").show();
		},
		function(){
			$(this).children(".sub").hide();
		});
	})
	.end()
	.find("ul.sub").each(function(){
		$(this).children("li:last").children("a").css("borderBottom","none");
	});
})

//-->