// functions for sharepointlists
var LastPageRow = "";
function getContentOfSharepointList(ListGenId, ViewId, StartItem, Rendering, ItemsPerPage, bRerender)
{
    if (ListGenId.tagName) {
        ListGenId = GetListGenIdFromDiv(ListGenId);
        if (ListGenId == "")
            return;
    }
    var ListId = ListGenId.substring(0, ListGenId.lastIndexOf("_genid"));
	var aPages = eval("aPages_" + ViewId.replace("\{","").replace("\}","").replace(/-/g, ""));
	var ContentUrl = L_Menu_BaseUrl + "/_layouts/wcms3/ioservice.aspx?command=getcontentofsharepointlist&listid=" + encodeURIComponent(ListId) + "&viewid=" + encodeURIComponent(ViewId) + "&startitem=" + encodeURIComponent(StartItem) + "&rendering=" + Rendering + "&itemsperpage=" + ItemsPerPage + "&page=" + aPages.length;
	if (aPages)
	{
		FillPagesArray(aPages, ContentUrl);
	}
	FillInContent(ListGenId, ListId, ContentUrl, bRerender);
}
function getPreviousPage(ListGenId, ViewId, Page)
{
    if (ListGenId.tagName) {
        ListGenId = GetListGenIdFromDiv(ListGenId);
        if (ListGenId == "")
            return;
    }
    var ListId = ListGenId.substring(0, ListGenId.lastIndexOf("_genid"));
	var aPages = eval("aPages_" + ViewId.replace("\{","").replace("\}","").replace(/-/g, ""));
	aPages.pop();
	FillInContent(ListGenId, ListId, aPages[aPages.length-1], true);
//	if(aPages[Page])
//	{
//		FillInContent(ListId, aPages[Page], true);
//	}
}
function GetListGenIdFromDiv(oThis)
{
    var sListGenId = "";
    var oParentNode = oThis;
    while (true)
    {
        if (oParentNode.id.substring(0, 4) == "spl_") {
            sListGenId = oParentNode.id.substring(4);
            break;
        }
        oParentNode = oParentNode.parentNode;
        if (oParentNode == null)
            break;
    }
    return sListGenId;
}

function FillInContent(ListGenId, ListId, ContentUrl, bRerender)
{
    document.getElementById("spl_" + ListGenId).innerHTML = "<img src='/tgx2/images/loadingcircle.gif'></img>";
    $.get(ContentUrl, function(data){if ((data.xml && data.xml.indexOf("<error>") > -1) || (!data.xml && data.indexOf("<error>") > -1)) alert(data); document.getElementById("spl_" + ListGenId).innerHTML = data;});
}
function FillPagesArray(aPages, Url)
{
	if(aPages.length == 0)
	{
		aPages.push(Url);
		return; 
	}
	var bFillIn = true;
	for(var i=0; i<aPages.length; i++)
	{
		if(aPages[i] == Url)
		{
			bFillIn = false;
			break;
		}
	}
	if(bFillIn == true)
	{
		aPages.push(Url);
	}
}
//#####################################################
//open a print window
function PrintThisPage(sUrl, nWidth)
{
	var sOpenUrl = sUrl;
	if (sOpenUrl.indexOf("?") > -1)
		sOpenUrl += "&";
	else
		sOpenUrl += "?";
	sOpenUrl += "printpage=true";
	openWindow(sOpenUrl, nWidth, -1, "scrollBars=1,resizable=1");
}

function getPos(id)
{
	return getPosByObject(document.getElementById(id));
}
function getPosByElement(obj)
{
	var pos = {left:0, top:0};

	if(typeof obj.offsetLeft != 'undefined')
	{
		while (obj) {
			pos.left += obj.offsetLeft;
			pos.top += obj.offsetTop;
			obj = obj.offsetParent;
		}
	} else {
		pos.left = obj.left;
		pos.top = obj.top;
	}

	return pos;
}

function maxPosition()
{
	var iMaxPos = -Number.MAX_VALUE;

	for(var i = 0; i < maxPosition.arguments.length; i++) {
		if(maxPosition.arguments[i] > iMaxPos) {
			iMaxPos = maxPosition.arguments[i];
		}
	}
	return iMaxPos;
}

function setObjectHeight(id, height)
{
	var obj = document.getElementById(id);
	obj.style.height = height + "px";
}

function getObjectHeight(id)
{
	var obj = document.getElementById(id);
	var iObjectHeight = 0;
	iObjectHeight = obj.offsetHeight;
	return parseInt(iObjectHeight);
}

function getWindowInnerSize(win)
{
	if(!win) win = window;
		var objWin = new Object();
		if(typeof win.innerWidth != 'undefined') {
			objWin.width = win.innerWidth;
			objWin.height = win.innerHeight;
		} else {
			var obj = getBody(win);
			objWin.width = parseInt(obj.clientWidth);
			objWin.height = parseInt(obj.clientHeight);
		}
		return objWin;
}

function getBody(w)
{
	return (w.document.compatMode && w.document.compatMode == "CSS1Compat") ? w.document.documentElement : w.document.body || null;
}

function positionFooter()
{
	var iSecNavPos = getPos("sec-nav-footer-placeholder").top;
	var iContentPos = getPos("content-footer-placeholder").top;
	var iContextPos = getPos("context-footer-placeholder").top;

	var iWindowInnerHeight = getWindowInnerSize().height;
	var iWindowMinPos = iWindowInnerHeight - getObjectHeight("footer-padding");

	var iMaxValue = maxPosition(iSecNavPos, iContentPos, iContextPos, iWindowMinPos);

	var iContentFooterPHHeight = 0;

	if (iMaxValue > iContentPos) {
		iContentFooterPHHeight = iMaxValue - iContentPos;
	}

	setObjectHeight("content-footer-placeholder", iContentFooterPHHeight);
}


/*

//START: Fix IE 6 Text Selection Bug
if (window.createPopup && document.compatMode && document.compatMode=="CSS1Compat")
{
	document.onreadystatechange = onresize = function fixIE6AbsPos()
	{
		if (!document.body) return;
		onresize = null;
		document.body.style.height = 0;
		setTimeout(function() { document.body.style.height = document.documentElement.scrollHeight+'px'; }, 1);
		setTimeout(function() { onresize = fixIE6AbsPos; }, 100);
	}
}
//END: Fix IE 6 Text Selection Bug


*/


function init()
{
	sStatus = "loaded";
}
//window.onresize = init;


/* check the width of the image an resize it to nMaxWidth */
function imageloadcomplete(nMaxWidth)
{
	if (event.srcElement.readyState != "complete")
		return;
	if (!nMaxWidth)
		return;
	
	var oThis = event.srcElement;
	oThis.style.width = "";
	var nWidth = oThis.width;
	if (nWidth == 0)
	{
		var oImage = new Image();
		oImage.src = oThis.src;
		nWidth = oImage.width;
	}
	if (nWidth > nMaxWidth)
		oThis.style.width = nMaxWidth + "px";
}

function gotoLinkWithSubmit() {
	document.forms[0].action = "";
	document.forms[0].submit();
	return;
}
function gotoLink(oThis) {
    var sValue = "";
    if (oThis.options && oThis.options[0])
        sValue = oThis.options[0].value;
    if (oThis.options && oThis.options[oThis.selectedIndex])
	    sValue = oThis.options[oThis.selectedIndex].value;
	if (sValue.substring(0, "dpglossarycategory".length) == "dpglossarycategory")
	{
		document.getElementById("dpglossarycategory").value = sValue.substring("dpglossarycategory".length+1);
		document.forms[0].action = "";
		document.forms[0].submit();
		return;
	}
	if (sValue == "")
	    return "";
	    
	var sGotoURL = '';
	if (oThis.tagName.toUpperCase() == 'SELECT');
		sGotoURL = sValue;
	if (sGotoURL != '') {
		if (sGotoURL.substring(sGotoURL.length-7) == ",_blank")
		{
			sGotoURL = sGotoURL.substring(0, sGotoURL.length-7);
			window.open(sGotoURL);
		}else{
			location.href = sGotoURL;
		}
	}
}

function openWindow(OpenUrl, Width, Height, Param)
{
	var nWidth = Width;
	if (!Width || Width == -1)
		nWidth = screen.availWidth - 10;
	var nLeft = (screen.availWidth - nWidth) / 2;
	var nHeight = Height;
	if (!Height || Height == -1)
		nHeight = screen.availHeight - 30;
	var nTop = (screen.availHeight - nHeight) / 2;
	if (nTop > 9)
	    nTop = nTop -10;
    
    var sParam = ",toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0";
    if (Param) {
        if (Param.substring(1,1) != ",")
            sParam = "," + Param;
        else
            sParam = Param;
    }
    if (sParam.indexOf("scrollBars") == -1)
        sParam += ",scrollBars=0";
    if (sParam.indexOf("resizable") == -1)
        sParam += ",resizable=0";
        
    newPage = window.open(OpenUrl, '', "width=" + nWidth + ",height=" + nHeight + ",left=" + nLeft +",top=" + nTop + sParam);
    newPage.focus();
}


//toggle between open and close of a portlet box
function toggle_boxOpenClose(oElement)
{
	var bOpen = false;
	if (oElement.className == "boxopen") {
		oElement.className = "boxclose";
	}else{
		oElement.className = "boxopen";
		bOpen = true;
	}
	oElement = oElement.parentNode;
	var oContentDiv = oElement.getElementsByTagName("DIV");
	var oContentDivLength = oContentDiv.length;

	for (var xi=0;xi<oContentDivLength;xi++) {
		if (oContentDiv[xi].className == "portlet-content") {
			if (bOpen)
				oContentDiv[xi].style.display = "inline";
			else
				oContentDiv[xi].style.display = "none";
			break;
		}
	}
	
}
//open a portlet linkbox
var oOpenLinkBox = null;
function do_LinkBoxOpen(sId)
{
	if (oOpenLinkBox != null) {
		var sOldId = oOpenLinkBox.id.substring(3);
		document.getElementById("lbc" + sOldId).style.display = "none";
		oOpenLinkBox.className = "linkboxopen";
		if (sOldId == sId) {
			oOpenLinkBox = null;
			return;
		}
		oOpenLinkBox = null;
	}
	
	document.getElementById("lbc" + sId).style.display = "block";
	oOpenLinkBox = document.getElementById("pbd" + sId);
	oOpenLinkBox.className = "linkboxclose";
}
//open a portlet NewschannelCategory
var oSelectAggCategoryDIV = null;
function do_SelectCategory(oThis)
{
    if (oSelectAggCategoryDIV)
        oSelectAggCategoryDIV.style.display = "none";

	var sId = oThis.options[oThis.selectedIndex].value;

	oSelectAggCategoryDIV = document.getElementById(sId);
	oSelectAggCategoryDIV.style.display = "block";
}

function selectSharedContent(oThis)
{
	event.cancelBubble = true;
	event.returnValue = false;
	if (!oThis)
		return false;

	window.returnValue = oThis.guid;
	self.close();
}


//Zoom
function OpenZoomPopup(url, description, opentype)
{
    var sOpenParam = 'resizable=no,menubar=no,status=no,scrollbars=no,toolbar=no';
    if (opentype == "Video")
        sOpenParam += ',width=480,height=376';
    else
        sOpenParam += ',width=621,height=525';
    window.open(L_Menu_BaseUrl + "/_layouts/wcms3/ioservice.aspx?command=showzoompopup&uid=" + url + "&description=" + encodeURI(description) + "&opentype=" + opentype, '', sOpenParam);
	return false;
}
//Zoom


//Flash
/*
function showFlash(classname, flashID, flashSrc, flashWidth, flashHeight, flashParameter1, flashParameter2, flashParameter3, flashParameter4, flashParameter5) {
    var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
    if (!hasReqestedVersion || flashSrc == "") {
		setTimeout("visiblePicture('" + flashID + "')", 50);
		return;
	}

	var sTmp = "";
	sTmp += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
	sTmp += '	codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"';
	sTmp += '	class="' + classname + '"';
	sTmp += '	WIDTH="' + flashWidth + '"';
	sTmp += '	HEIGHT="' + flashHeight + '"';
	sTmp += '	id="flashid' + flashID + '"';
	sTmp += '	ALIGN="">';
	sTmp += '	<param name="movie" value="' + flashSrc + '" />';
	sTmp += '	<param name="wmode" value="opaque"/>';                        
	sTmp += '	<param name="play" value="false">';
	sTmp += '	<param name="loop" value="false">';
	sTmp += '	<param name="quality" value="high">'
	sTmp += '	<param name="menu" value="false">';  					
	if (flashParameter1)
		sTmp += '	<param name="FlashVars" value="' + flashParameter1.replace('"', '\\"') + '">';
	if (flashParameter2)
		sTmp += '	<param name="FlashVars" value="' + flashParameter2.replace('"', '\\"') + '">';
	if (flashParameter3)
		sTmp += '	<param name="FlashVars" value="' + flashParameter3.replace('"', '\\"') + '">';
	if (flashParameter4)
		sTmp += '	<param name="FlashVars" value="' + flashParameter4.replace('"', '\\"') + '">';
	if (flashParameter5)
		sTmp += '	<param name="FlashVars" value="' + flashParameter5.replace('"', '\\"') + '">';
	
	sTmp += '	<EMBED src="' + flashSrc + '"';
	sTmp += '		class="' + classname + '"';
	sTmp += '		quality="high" play="true" loop="true" menu="false" wmode="opaque"';
	sTmp += '		swLiveConnect="true"';
	sTmp += '		WIDTH="' + flashWidth + '"';
	sTmp += '		HEIGHT="' + flashHeight + '"';
	sTmp += '		NAME="' + flashID + '"';
	sTmp += '		TYPE="application/x-shockwave-flash" ';
	sTmp += '		PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"';
	if (flashParameter1)
		sTmp += '	FlashVars="' + flashParameter1.replace('"', '\\"') + '"';
	if (flashParameter2)
		sTmp += '	FlashVars="' + flashParameter2.replace('"', '\\"') + '"';
	if (flashParameter3)
		sTmp += '	FlashVars="' + flashParameter3.replace('"', '\\"') + '"';
	if (flashParameter4)
		sTmp += '	FlashVars="' + flashParameter4.replace('"', '\\"') + '"';
	if (flashParameter5)
		sTmp += '	FlashVars="' + flashParameter5.replace('"', '\\"') + '"';
	sTmp += '		>';
	sTmp += '	</EMBED> ';
	sTmp += '</object>';
	
	document.write(sTmp);
}
function visiblePicture(flashID)
{
	var oPicElm = document.getElementById("imgid" + flashID);
	if (!oPicElm)
		return;
	oPicElm.style.display = "inline";
}
//
*/


// Globals
// Major version of Flash required
var requiredMajorVersion = 7;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
// the version of javascript supported
var jsVersion = 1.0;

/*
<!-- // Detect Client Browser type
jsVersion = 1.1;
// JavaScript helper required to detect Flash Player PlugIn version information
function JSGetSwfVer(i){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			descArray = flashDescription.split(" ");
			tempArrayMajor = descArray[2].split(".");
			versionMajor = tempArrayMajor[0];
			versionMinor = tempArrayMajor[1];
			if ( descArray[3] != "" ) {
				tempArrayMinor = descArray[3].split("r");
			} else {
				tempArrayMinor = descArray[4].split("r");
			}
			versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
			flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		} else {
			flashVer = -1;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	// Can't detect in all other cases
	else {
		
		flashVer = -1;
	}
	return flashVer;
} 

*/


/*
function showVideoContainer(VideoSmall, VideoLarge, StartImage, SoundOn, AutoPlay, Description, bIsSmall){
    try
    {
	    var FlashCode = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ';
	    if (bIsSmall) {
	        FlashCode += 'id="videoContainer_small" ' + 'width="284" ' + 'height="229"/>';
		    FlashCode += '<param name="movie" value="/wcms3/images/flash/videoContainer_small.swf?flvPath='+VideoSmall+'&flvPathLarge='+VideoLarge+'&startImagePath='+StartImage+'&customer=SVDO&soundOn='+SoundOn+'&autoplay='+AutoPlay+'&description='+Description+'"/>';
	    }else{
	        FlashCode += 'id="videoContainer_large" ' + 'width="480" ' + 'height="376"/>';
		    FlashCode += '<param name="movie" value="/wcms3/images/flash/videoContainer_large.swf?flvPathLarge='+VideoLarge+'&customer=SVDO"/>'
        }
	    FlashCode += '<param name="bgcolor" value="#ffffff"/>';
	    FlashCode += '<param name="quality" value="high"/>'
	    FlashCode += '<embed ';

	    if (bIsSmall) {
            FlashCode += 'src="/wcms3/images/flash/videoContainer_small.swf?flvPath='+VideoSmall+'&flvPathLarge='+VideoLarge+'&startImagePath='+StartImage+'&customer=SVDO&soundOn='+SoundOn+'&autoplay='+AutoPlay+'&description='+Description+'" '
        		+ 'width="284" '
		        + 'height="229" '
		        + 'name="videoContainer_small" ';
	    }else{
		    FlashCode += 'src="/wcms3/images/flash/videoContainer_large.swf?flvPathLarge='+VideoLarge+'&customer=SVDO" '
        		+ 'width="480" '
		        + 'height="376" '
		        + 'name="videoContainer_large" ';
	    }    
	    FlashCode += 'bgcolor="#ffffff" '
		    + 'quality="high" '
		    + 'align="middle" '
		    + 'loop="false" '
		    + 'quality="high" '
		    + 'allowScriptAccess="sameDomain" '
		    + 'type="application/x-shockwave-flash" '
		    + 'pluginspage="http://www.macromedia.com/go/getflashplayer"/>'
		    + '<\/embed/>'
		    + '<\/object/>';
    	document.write(FlashCode);
    }catch(Ex)
    {
        alert("showVideoContainer " + Ex.message);
    }   		
}


// -------------------------------------- FLASHDETECTION
// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) 
{
	var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
	var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
	var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

	reqVer = parseFloat(reqMajorVer + "." + reqRevision);
	// loop backwards through the versions until we find the newest version	
	for (i=25;i>0;i--) {	
		if (isIE && isWin && !isOpera) {
		    var sVBScript = '<SCR' + 'IPT LANGUAGE=VBScript\>\n';
		    sVBScript += 'Function VBGetSwfVer(i)\n';
		    sVBScript += 'on error resume next\n';
		    sVBScript += 'Dim swControl, swVersion\n';
		    sVBScript += 'swVersion = 0\n';
		    sVBScript += 'set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))\n';
		    sVBScript += 'if (IsObject(swControl)) then\n';
			sVBScript += 'swVersion = swControl.GetVariable("$version")\n';
		    sVBScript += 'end if\n';
		    sVBScript += 'VBGetSwfVer = swVersion\n';
		    sVBScript += 'End Function\n';
		    sVBScript += '</SCR' + 'IPT\>\n';

		    document.write(sVBScript);		

			versionStr = VBGetSwfVer(i);
		} else {
			versionStr = JSGetSwfVer(i);		
		}
		if (versionStr == -1 ) { 
			return false;
		} else if (versionStr != 0) {
			if(isIE && isWin && !isOpera) {
				tempArray         = versionStr.split(" ");
				tempString        = tempArray[1];
				versionArray      = tempString .split(",");				
			} else {
				versionArray      = versionStr.split(".");
			}
			versionMajor      = versionArray[0];
			versionMinor      = versionArray[1];
			versionRevision   = versionArray[2];
			
			versionString     = versionMajor + "." + versionRevision;   // 7.0r24 == 7.24
			versionNum        = parseFloat(versionString);
			// is the major.revision >= requested major.revision AND the minor version >= requested minor
			if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
				return true;
			} else {
				return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );	
			}
		}
	}	
}
// JavaScript helper required to detect Flash Player PlugIn version information
function JSGetSwfVer(i){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			descArray = flashDescription.split(" ");
			tempArrayMajor = descArray[2].split(".");
			versionMajor = tempArrayMajor[0];
			versionMinor = tempArrayMajor[1];
			if ( descArray[3] != "" ) {
				tempArrayMinor = descArray[3].split("r");
			} else {
				tempArrayMinor = descArray[4].split("r");
			}
			versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
			flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		} else {
			flashVer = -1;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	// Can't detect in all other cases
	else {
		
		flashVer = -1;
	}
	return flashVer;
} 

*/

/*

function flashVersion(version)
{
	var myBrowser = new Browser(version);
	if (myBrowser.isFlashed) return true;
	else return false;	
}
function Browser(requiredFlashVersion)
{ 
	this.isIE=false;
	this.isNS=false;
	this.isOpera=false;
	this.isMozilla=false;
	
	this.isWin=false;								
	this.isMac=false;
	this.isLinux=false;					
	
	this.version=0;	
	this.isFlashed=false;
	
	var maxFlashVersion=7;
	var agent=navigator.userAgent.toLowerCase();									
	
	this.isIE = agent.indexOf("msie") != -1 && agent.indexOf("opera") == -1; 
	this.isNS = (agent.indexOf("netscape") != -1 || navigator.appName == "Netscape") && agent.indexOf("opera") == -1; // in netscape4 "netscape" doesn't appear in navigator.userAgent
	
	this.isOpera = agent.indexOf("opera") != -1;
	this.isMozilla = agent.indexOf("mozilla") != -1;
	this.isKonqueror = agent.indexOf("konqueror") != -1;					
	
	this.isWin = agent.indexOf("win") != -1;		
	this.isMac = agent.indexOf("mac") != -1;
	this.isLinux = agent.indexOf("linux") != -1;
						
	var minor = parseFloat(navigator.appVersion);
	
	if (this.isNS)
	{
		if (minor >= 5)
		{
			this.version=6;
		} else
		{
			this.version=minor;
		}
		
	}else if(this.isKonqueror)
	{
		this.version=minor;

	}else if(this.isIE)
	{
		if (agent.indexOf("msie 5") != -1 && minor == 4)
		{
			this.version = 5;
		} else
		{
			this.version = minor;
		}

	}else if (this.isOpera)
	{
		if (agent.indexOf("opera 2") != -1 || agent.indexOf("opera/2") != -1) 
		this.version=2;
		if (agent.indexOf("opera 3") != -1 || agent.indexOf("opera/3") != -1) 
		this.version=3;						
		if (agent.indexOf("opera 4") != -1 || agent.indexOf("opera/4") != -1) 
		this.version=4;						
		if (agent.indexOf("opera 5") != -1 || agent.indexOf("opera/5") != -1) 
		this.version=5;
		if (agent.indexOf("opera 6") != -1 || agent.indexOf("opera/6") != -1) 
		this.version=6;			    					
	}
	
	// -------------------------------------- WIN/IE FLASH VERSION CHECK
	
	if (this.isIE && this.isWin)
	{
		document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
		document.write('on error resume next \n');		
		for (i = requiredFlashVersion; i<maxFlashVersion+1; i++)
		{
			document.write('flash' + i + 'Installed = false \n');
			document.write('flash' + i + 'Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.' + i + '"))) \n');			
		}			
		document.write('</SCR' + 'IPT\> \n');		
	
		for (i = requiredFlashVersion; i<maxFlashVersion+1; i++)
		{
			if (eval("flash" + i + "Installed"))
			{
				this.isFlashed=true;
				break;
			}
		}
			
	// -------------------------------------- REST FLASH VERSION CHECK
	
	} else if (navigator.plugins && navigator.plugins["Shockwave Flash"])
	{
		var plugin = navigator.plugins["Shockwave Flash"];							
		this.isFlashed = (plugin.description.charAt(plugin.description.indexOf(".")-1) >= requiredFlashVersion);
	}
}
*/

