function fullFlashObject( url ) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="100%" height="100%" id="mainswf" align="middle">');
	document.write('<param name="allowScriptAccess" value="always" />');
	document.write('<param name="movie" value="' + url + '" />');
	document.write('<param name="quality" value="high" /><param name="bgcolor" value="#FFFFFF" /><param name="wmode" value="" /><param name="scale" value="noscale" /><param name="swLiveConnect" value="true" />');
	document.write('<embed src="' + url + '" quality="high" width="100%"  height="100%" scale="noscale" bgcolor="#FFFFFF" wmode="" name="mainswf" align="middle" swLiveConnect=true allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');

}

function launchRedhatMicrosite()
{

launchPopupNoChrome('/attachment/redhat_microsite.htm?sa_campaign=/microsite/redhat/homepageanimation','redhatpopup',440,675);
}


function launchDeltaMicrosite()
{

launchPopupNoChrome('/attachment/delta_microsite.htm?sa_campaign=/microsite/deltamicrosite/homepageanimation','deltamicrositepopup',440,675);
}

function launchPopupNoChrome( theurl, name, width, height )

{

	var URLen = theurl;

	var winHeight = height;

	var winWidth = width;



	var windowNamen=name;

	var browserName=navigator.appName;

	var operatingSystem=navigator.platform;

	var version = parseFloat(navigator.appVersion);

	//var winWidth = window.screen.availWidth;

	//var winHeight = window.screen.availHeight;



	var thewindow;

	// Netscape check version 4.0+ on Win

	if (browserName.indexOf("Netscape")!=-1 && version>=4.0 && operatingSystem.indexOf("Mac")!=-1)

	{

		 thewindow = window.open(URLen,windowNamen,'titlebar=no,width=' + winWidth +',height='+winHeight)

	}



	// MSIE Mac check

	else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Mac")!=-1)

	{

		thewindow = window.open(URLen,windowNamen,'titlebar=no,width=' + winWidth +',height='+ winHeight )

	}



	// Netscape Mac check

	else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Mac")!=-1)

	{

		thewindow = window.open(URLen,windowNamen,'width='+ winWidth +',height='+ winHeight);

	}



	// MSIE Windows

	else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Win")!=-1)

	{

		//window.open(URLen,windowNamen,'fullscreen=1,top=0,left=0');		 

		var win = window.open(URLen,windowNamen,'titlebar=no,toolbar=0,location=0,directories=0,status=1,resizable=1,scrollbars=1,menubar=0,width=' + (winWidth+20) +',height='+ winHeight );

		//win.resizeTo(screen.width, screen.height);

		thewindow = win;

		//win.moveTo(1, 1);

		//win.moveTo(0, 0);

		//win.resizeTo(screen.width, screen.height);

	}



		// Netscape Windows

	else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Win")!=-1)

	{

		thewindow = window.open(URLen,windowNamen,'width='+ winWidth +',height='+ winHeight );

	}



	else

	{

		thewindow = window.open(URLen,windowNamen);

	}

	thewindow.focus();

}



function launchPopupAutoChrome( theurl, name, width, height )

{

	var URLen = theurl;

	var winHeight = height;

	var winWidth = width;



	var windowNamen=name;

	var browserName=navigator.appName;

	var operatingSystem=navigator.platform;

	var version = parseFloat(navigator.appVersion);

	//var winWidth = window.screen.availWidth;

	//var winHeight = window.screen.availHeight;



	var thewindow;

	// Netscape check version 4.0+ on Win

	if (browserName.indexOf("Netscape")!=-1 && version>=4.0 && operatingSystem.indexOf("Mac")!=-1)

	{

		 thewindow = window.open(URLen,windowNamen,'titlebar=no,width=' + winWidth +',height='+winHeight)

	}



	// MSIE Mac check

	else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Mac")!=-1)

	{

		thewindow = window.open(URLen,windowNamen,'titlebar=no,width=' + winWidth +',height='+ winHeight )

	}



	// Netscape Mac check

	else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Mac")!=-1)

	{

		thewindow = window.open(URLen,windowNamen,'width='+ winWidth +',height='+ winHeight);

	}



	// MSIE Windows

	else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Win")!=-1)

	{

		//window.open(URLen,windowNamen,'fullscreen=1,top=0,left=0');		 

		var win = window.open(URLen,windowNamen,'titlebar=no,toolbar=0,location=0,directories=0,status=1,resizable=1,scrollbars=1,menubar=0,width=' + (winWidth+20) +',height='+ winHeight );

		//win.resizeTo(screen.width, screen.height);

		thewindow = win;

		//win.moveTo(1, 1);

		//win.moveTo(0, 0);

		//win.resizeTo(screen.width, screen.height);

	}



		// Netscape Windows

	else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Win")!=-1)

	{

		thewindow = window.open(URLen,windowNamen,'width='+ winWidth +',height='+ winHeight );

	}



	else

	{

		thewindow = window.open(URLen,windowNamen);

	}

	//thewindow.focus();

}




function swapClass(i,c) { 

	if (document.getElementById) {  

	document.getElementById(i).className =  c;  

	} else {

	document.all[i].className = c;	

	}

}



function getElement( base, i ) {

	if (base.getElementById) {  

		return base.getElementById(i);  

	} else {

		return base.all[i];	

	}

}



function swapSrc(i,c) { 

	if (document.getElementById) {  

	document.getElementById(i).src =  c;  

	} else {

	document.all[i].src = c;	

	}

}



function parseQueryString (str) {

  str = str ? str : location.search;

  var query = str.charAt(0) == '?' ? str.substring(1) : str;

  var args = new Object();

  if (query) {

    var fields = query.split('&');

    for (var f = 0; f < fields.length; f++) {

      var field = fields[f].split('=');

      args[unescape(field[0].replace(/\+/g, ' '))] = unescape(field[1].replace(/\+/g, ' '));

    }

  }

  return args;

}


function launchTycoElecMicrosite()
{
	launchPopupNoChrome('/attachment/tycoelec_microsite.htm?sa_campaign=/microsite/tycoelec/homepageanimation','tycoelecpopup',440,675);
}

function launchCovidienMicrosite()
{
	launchPopupNoChrome('/attachment/tyco_covidien.htm?sa_campaign=/microsite/tyco_covidien/homepageanimation','tycoelecpopup',440,675);
}
