var g_sLayerContent = "";
var g_iTimeOut = 4000;
var g_iTimeOutID;

function highlightCountry()
{
	var l_sCountry = document.location.href;
	var idx = l_sCountry.lastIndexOf("#");
	if (idx > 0)
	{
		l_sCountry = l_sCountry.substring(idx + 1, l_sCountry.length);
		if (isValid(l_sCountry))
		{
			var l_oObject = document.getElementById("b_" + l_sCountry);
			if(isValid(l_oObject))
			{
				l_oObject.className = "orange";
			}
		}
	}
}

/*
'----------------------------------------------GM--
' Author:						Gina Mako
' Date-Written:			23.04.2006
'
' for inernal calls
'----------------------------------------------GM--
*/

function getElementPosition(element) 
{
  var result = new Object();
  result.x = 0;
  result.y = 0;
  result.width = 0;
  result.height = 0;
  if (isValid(element))
  {
		if (element.offsetParent) 
		{
		  result.x = element.offsetLeft;
		  result.y = element.offsetTop;
		  var parent = element.offsetParent;
		  while (parent) 
		  {
		    result.x += parent.offsetLeft;
		    result.y += parent.offsetTop;
		    var parentTagName = parent.tagName.toLowerCase();
		    if (parentTagName != "table" &&
		        parentTagName != "body" && 
		        parentTagName != "html" && 
		        parentTagName != "div" && 
		        parent.clientTop && 
		        parent.clientLeft) 
		    {
		      result.x += parent.clientLeft;
		      result.y += parent.clientTop;
		    }
		    parent = parent.offsetParent;
		  }
		} //if (element.offsetParent) 
		else if (element.left && element.top) 
		{
		  result.x = element.left;
		  result.y = element.top;
		} //else if (element.left && element.top) 
		else 
		{
		  if (element.x) 
		  {
		      result.x = element.x;
		  }
		  if (element.y) 
		  {
		      result.y = element.y;
		  }
		}//else if (element.left && element.top) 
		
		if (element.offsetWidth && element.offsetHeight) 
		{
		  result.width = element.offsetWidth;
		  result.height = element.offsetHeight;
		} //if (element.offsetWidth && element.offsetHeight) 
		else if (element.style && element.style.pixelWidth && element.style.pixelHeight) 
		{
		  result.width = element.style.pixelWidth;
		  result.height = element.style.pixelHeight;
		} //else if (element.style && element.style.pixelWidth && element.style.pixelHeight) 
	} //if (isValid(element))
  return result;
}

function fillContainer(
												pi_sHeader, 
												pi_iImageID,
												pi_aObjectNames, 
												pi_aObjectIDs, 
												pi_aObjectPictures,
												pi_bHeaderPrefix,
												pi_sActivePicture
											)
{
	var l_iPosTop = 238;
	
	window.clearTimeout(g_iTimeOutID);
	
	//---------------------------------GM--
	// highlight the bullet
	//---------------------------------GM--
	if (isValid(pi_sActivePicture))
	{
		var l_oIMG = document.getElementById("img" + pi_iImageID);
		if (isValid(l_oIMG))
		{
			l_oIMG.src='images/organigramm/' + pi_sActivePicture;
		}
	} //if (isValid(pi_sActivePicture))
	else
	{
		var l_oIMGBullet = document.getElementById("img" + pi_iImageID);
		if (isValid(l_oIMGBullet))
		{
			l_oIMGBullet.src='images/objects/bullet_big_a.gif';
		}
	}	// if (isValid(pi_sActivePicture))

	//---------------------------------GM--
	// fill the table
	//---------------------------------GM--
	var l_sHTML = '<table border="0" cellpadding="3" cellspacing="1" width="167" '
							+				'	onMouseOver="window.clearTimeout(g_iTimeOutID);" '
							+				'	onMouseOut="g_iTimeOutID = window.setTimeout(\'mouseOut(' + pi_iImageID +')\', g_iTimeOut);">'
							+		'<tr>'
							+			'<td class="tdbgGreen"><img border="0" src="images/blank.gif" width="1" height="1"></td>'
							+			'<td class="tdbg1">'
							+				(
													(pi_bHeaderPrefix == false)
												? '<b>Objekt' + (
																						(pi_aObjectNames.length > 1) 
																					? 'e' 
																					: ''
																				) +  ' ' 
												: ''
											) 
							+ pi_sHeader + '</b></td>'
							+		'</tr>';
					
	for(var i = 0; i < pi_aObjectNames.length; i++ )
	{
		var l_sURL = 'showObjects.asp?menutype_id=3&language_id=2&menu_id=' + pi_aObjectIDs[i];
		l_sHTML +=	'<tr>'
						+			'<td class="tdbg5" valign="top" width="15"><!--img border="0" src="images/icons/square_orange.gif" width="15" height="15"--></td>'
						+			'<td class="tdbg5" valign="top">' 
						+				'<a href="' + l_sURL + '" class"left" target="_top">' 
						+					pi_aObjectNames[i] 
						+				'</a>';
						
		if( pi_aObjectPictures[i] != '')
		{
			l_sHTML +=		'<br>'
							+				'<a href="' + l_sURL + '">' 
							+					'<img src="images/objects/thumbnails/' + pi_aObjectPictures[i] + '" border="0" width="60" height="60" vspace="10" alt="' + pi_aObjectNames[i] + '">'
							+				'</a>';
		}
		l_sHTML +=	'</td>'
						+		'</tr>';
	} //for(var i = 0; i < pi_aObjectNames.length; i++ )
	l_sHTML += '</table>'
	
	var l_oLayer = document.getElementById('divContainer');
	
	//-------------------------------------------------GM--
	// save the layers content before overwriting it
	//-------------------------------------------------GM--
	g_sLayerContent = l_oLayer.innerHTML;
	l_oLayer.innerHTML = l_sHTML;

	var l_oRelativeElement = document.getElementById("imgQuery");
	var l_oCords = getElementPosition(l_oRelativeElement);
	var l_iPosLeft = l_oCords.x + 9;
	showLayer("divContainer", l_iPosLeft, l_iPosTop);

} //function fillContainer

function mouseOut(pi_iImageID)
{
	var l_oLayer = document.getElementById('divContainer');
	l_oLayer.innerHTML = ""; // g_sLayerContent;
}

function preloadImages() 
{ 
  var d = document; 
  if(d.images)
  { 
		if(!d.MM_p) 
			d.MM_p=new Array();
    
    var i, j = d.MM_p.length, a = preloadImages.arguments; 
    for(i = 0; i < a.length; i++)
    {
			if (a[i].indexOf("#") != 0)
			{ 
				d.MM_p[j] = new Image; 
				d.MM_p[j++].src=a[i];
			} //if (a[i].indexOf("#") != 0)
		} //for(i = 0; i < a.length; i++)
	} //if(d.images)
} //function preloadImages() 



function openNewWindow(pi_sURL, pi_iWidth, pi_iHeight) 
	{
		var l_iWidth	= 450;
		var l_iHeight = 550;

		var l_dDate = new Date();
	  l_sWindowname = l_dDate.getUTCHours() + "_"
									+ l_dDate.getUTCMinutes() + "_"
									+ l_dDate.getUTCSeconds() + "_"
									+ l_dDate.getUTCMilliseconds();
		//alert(l_sWindowname);

		
		if (pi_iWidth != "undefined")
			l_iWidth = pi_iWidth

		if (pi_iHeight != "undefined")
			l_iHeight = pi_iHeight

	  var l_sEG =
	    'Menubar=no'+
	    ',Toolbar=no'+
	    ',Directories=no'+
	    ',status=yes'+
	    ',resizable=yes'+
	    ',scrollbars=yes'+
	    ',width='+ l_iWidth + 
	    ',height=' + l_iHeight;
	  
	  //alert(l_sEG);
	  var l_oWindow = window.open(pi_sURL,l_sWindowname,l_sEG);
	  if (isValid(l_oWindow))
	  {
			l_oWindow.focus();
		}
	}


/*
'---------------------------------------GM--
' überprüft ob ein Objekt gültig ist
' 
' Author:				Gina Mako 
' Date-Written:	06.05.2002
'---------------------------------------GM--
*/
function isValid(pi_oObject)
{
	if (		pi_oObject == null 
			||	pi_oObject == "" 
			||	pi_oObject == "undefined" 
			||	typeof(pi_oObject) == "undefined"
			)
		return false;
	else
		return true;
}

function selectAll(pi_sFormName, pi_sElementName, pi_bChecked)
{
	var l_oElementsCollection = document.forms[pi_sFormName].elements[pi_sElementName];
	if (isValid(l_oElementsCollection))
	{
		if (!l_oElementsCollection.length)
		{
			/*
			'-----------------------------------------
			' wenn keine Collection sondern nur 
			' ein einzelnes Objekt zurückkommt
			'-----------------------------------------
			*/
			l_oElementsCollection.checked = true;
		}
		else
		{
			for(var i = 0; i < l_oElementsCollection.length; i++)
			{
				/*
				'-----------------------------------------
				' gehe die ganze Collection durch 
				' und aktiviere alle Elemente
				'-----------------------------------------
				*/
				l_oElementsCollection[i].checked = pi_bChecked;
			}//for(var i = 0; i < l_oElementsCollection.length; i++)
		}
	} // if (isValid(l_oElementsCollection))
} // function selectAll()

function confirmDelete(pi_sMessage, pi_sURL, pi_oTarget)  
{ 
	var l_oTarget = pi_oTarget;

	//alert(pi_sMessage);      
	var l_bCheck = confirm(pi_sMessage);
	if(l_bCheck == true)     
	{
		if (! isValid(l_oTarget))
		{
			l_oTarget = window;
		}
		l_oTarget.location.href	= pi_sURL;
	}
}       

/*
'---------------------------------------GM--
' Ändert die Reihenfolge der Elemente in einem SELECT-Objekt
' 
' Author:				Gina Mako 
' Date-Written:	06.05.2004
'---------------------------------------GM--
*/
function sort( 
								pi_iDirection, 
								pi_oList, 
								pi_oTextField
							)
{
	var l_oList				= pi_oList;
	var l_oTextField	= pi_oTextField;
			
	if (isValid(l_oList))
	{
		if (l_oList.selectedIndex == -1)
		{
			/*
			'---------------------------------------------------GM--
			' wenn kein Item ausgewählt wurde, 
			' dann zeige eine entsprechende Meldung an
			'---------------------------------------------------GM--
			*/
			alert("Bitte wählen Sie erst ein Icon aus.");
		}
		else //if (l_oList.selectedIndex == -1)
		{
			var l_sNewSortOrder = "";
			var l_iIndex				= l_oList.selectedIndex;
			var l_iNewIndex			= l_iIndex + 1 * pi_iDirection;
			var l_sValue				= "";
			var l_sText					= "";
					
			//alert(l_iIndex + '-' + l_iNewIndex);
					
			with(l_oList)
			{
				/*
				'---------------------------------------------------GM--
				' merke Value und Text von dem angeklickten Element
				'---------------------------------------------------GM--
				*/
				l_sValue	= options[l_iIndex].value;
				l_sText		= options[l_iIndex].text;

				if (!(l_iNewIndex < 0 || l_iNewIndex >= length))
				{
					/*
					'---------------------------------------------------GM--
					' wenn nur zwei Elemente vertauscht werden sollen
					'---------------------------------------------------GM--
					*/
					options[l_iIndex].value = options[l_iNewIndex].value;
					options[l_iIndex].text	= options[l_iNewIndex].text;
				} //if (!(l_iNewIndex < 0 || l_iNewIndex > length))

						

				if (l_iNewIndex < 0)
				{
					/*
					'---------------------------------------------------GM--
					' wenn das allererste Element ganz unten hin soll
					'---------------------------------------------------GM--
					*/
					for (var i = 1; i < length; i++)
					{
						
						/*
						'---------------------------------------------------GM--
						' verschiebe alle Elemente nach oben
						'---------------------------------------------------GM--
						*/
						options[i - 1].value	= options[i].value;
						options[i - 1].text		= options[i].text;
					} // for (var i = 1; i < length; i++)
							
					l_iNewIndex = i - 1;
				} //if (l_iNewIndex < 0)
						
				if (l_iNewIndex >= length)
				{
					/*
					'---------------------------------------------------GM--
					' wenn das allerletzte Element ganz oben hin soll
					'---------------------------------------------------GM--
					*/
					for (var i = length - 2; i >= 0;i--)
					{
						
						/*
						'---------------------------------------------------GM--
						' verschiebe alle Elemente nach oben
						'---------------------------------------------------GM--
						*/
						options[i + 1].value	= options[i].value;
						options[i + 1].text		= options[i].text;
					} // for (var i = 1; i < length; i++)
							
					l_iNewIndex = 0;
				} //l_iNewIndex > length
						
				options[l_iNewIndex].value	= l_sValue;
				options[l_iNewIndex].text		= l_sText;


				/*
				'---------------------------------------------------GM--
				' selektiere das Element automatisch
				'---------------------------------------------------GM--
				*/
				options[l_iNewIndex].selected = true;

				/*
				'---------------------------------------------------GM--
				' generiere einen neuen SortOrder-String 
				'---------------------------------------------------GM--
				*/
				for (var i = 0; i < length; i++)
				{
					l_sNewSortOrder += options[i].value + ",";
				}
				l_oTextField.value = l_sNewSortOrder;
			} //with(l_oList)
					
					
					
			//alert(l_oList.options[l_oList.selectedIndex].text);


		} //if (l_oList.selectedIndex == -1)
	} //if (isValid(l_oList))
}


function validateForm()
{
	var l_sFileName = null;
	
		/*
		'------------------------------------------------------------------------GM--
		' prüfe, ob es sich bei der EPS-Datei um eine ZIP-Datei handelt
		' andrenfalls, erlaube das Speichern der BLOBs nicht
		'------------------------------------------------------------------------GM--
		*/
		l_sFileName = document.getElementById("txtEPS").value
		//alert(l_sFileName.substring(l_sFileName.length - 4, l_sFileName.length).toLowerCase());
		if (l_sFileName != "" && l_sFileName.substring(l_sFileName.length - 4, l_sFileName.length).toLowerCase() != ".zip") 
		{
			alert("Die ausgewählte EPS-Datei ist keine gültige ZIP-Datei.");
			document.getElementById("txtEPS").focus();
			return false;
		}
	
		/*
		'------------------------------------------------------------------------GM--
		' prüfe, ob es sich bei der großen EPS-Datei um eine JPG-Datei handelt
		' andrenfalls, erlaube das Speichern der BLOBs nicht
		'------------------------------------------------------------------------GM--
		*/
		l_sFileName = document.getElementById("txtBIG").value
		if (l_sFileName != "" && l_sFileName.substring(l_sFileName.length - 4, l_sFileName.length).toLowerCase() != ".jpg") 
		{
			alert("Die ausgewählte große JPG-Datei ist keine gültige JPG-Datei.");
			document.getElementById("txtBIG").focus();
			return false;
		}

		/*
		'------------------------------------------------------------------------GM--
		' prüfe, ob es sich bei der kleinen EPS-Datei um eine JPG-Datei handelt
		' andrenfalls, erlaube das Speichern der BLOBs nicht
		'------------------------------------------------------------------------GM--
		*/
		l_sFileName = document.getElementById("txtSMALL").value
		if (l_sFileName != "" && l_sFileName.substring(l_sFileName.length - 4, l_sFileName.length).toLowerCase() != ".jpg") 
		{
			alert("Die ausgewählte kleine JPG-Datei ist keine gültige JPG-Datei.");
			document.getElementById("txtSMALL").focus();
			return false;
		}

	return validate();
}




function trim(pi_sValue) 
{
  // Remove leading spaces and carriage returns
  
  while ((pi_sValue.substring(0,1) == ' ') || (pi_sValue.substring(0,1) == '\n') || (pi_sValue.substring(0,1) == '\r'))
  {
    pi_sValue = pi_sValue.substring(1,pi_sValue.length);
  }

  // Remove trailing spaces and carriage returns

  while ((pi_sValue.substring(pi_sValue.length-1,pi_sValue.length) == ' ') || (pi_sValue.substring(pi_sValue.length-1,pi_sValue.length) == '\n') || (pi_sValue.substring(pi_sValue.length-1,pi_sValue.length) == '\r'))
  {
    pi_sValue = pi_sValue.substring(0,pi_sValue.length-1);
  }
  return pi_sValue;
}



function preValidate(pi_aParameters)
{
	var l_bValidate = false;
	
	for (var i = 0; i < pi_aParameters.length;)
	{
		var l_oField1 = document.getElementById(pi_aParameters[i]);
		var l_oField2 = document.getElementById(pi_aParameters[i + 1]);

		if (!(isValid(l_oField1) && isValid(l_oField2)))
		{
			return validate();
		}

			
		if (l_oField1.value == l_oField2.value)
		{	
			l_bValidate = true
		} 
		else //if (l_oField1.value == l_oField2.value)
		{
			alert(pi_aParameters[i + 2]);
			l_bValidate = false
			break;
		} // if (l_oField1.value == l_oField2.value)
		i +=3
	} //for (var i = 0; i < pi_aParameters.length; i + 2)
	
	return (l_bValidate ? validate() : false);
} //function compareValues(pi_sValue1, pi_sValue2)
	

function showImage(pi_iMediadataID, pi_iWidth, pi_iHeight, e)
{
	if (!e) e = window.event;
	var posX,posY;
	if (e.pageX || e.pageY)
	{
		posX = e.pageX;
		posY = e.pageY;
	}
	else if (e.clientX || e.clientY)
	{
		posX = e.clientX;
		posY = e.clientY;
		if (document.all)
		{
			posX += document.body.scrollLeft;
			posY += document.body.scrollTop;
		}
	}
	else 
	{
		alert ("Unknown browser");
		return;	
	}
		
	posX += 16;
	posY += 16;

			
	/*
	'--------------------------------------GM--
	' zeige das gesuchte Image an
	'--------------------------------------GM--
	*/
	var l_oImage = document.getElementById("imgProduct");
	if (isValid(l_oImage))
	{
		var l_iPositionX = posX;
		var l_iPositionY = posY;
			
		if (isValid(pi_iMediadataID))
		{
			with(l_oImage.style)
			{
				position		= "absolute"; 
				top					= l_iPositionY;
				left				= l_iPositionX; 
				width				= pi_iWidth;
				height			= pi_iHeight;
				visibility	= "visible"; 
			} //with(l_oImage.style)

			l_oImage.src = "../image.asp?mediadata_id=" + pi_iMediadataID;

		} //if (isValid(pi_iMediadataID))
	} //if (isValid(l_oImage))
} //function showImage(pi_sDivisionCode, pi_sArticleCode)

function hideImage(pi_sDivisionCode, pi_sArticleCode)
{
	var l_oImage = document.getElementById("imgProduct");
		
	if (isValid(l_oImage))
	{
		l_oImage.src = "../images/1p_transp.gif";
		l_oImage.style.visibility	= "hidden"; 
	} //if (isValid(l_oImage))
} //function hideImage(pi_sDivisionCode, pi_sArticleCode)

	
		//#########################################
		function DHTML_ExecuteCommand(pi_sCommandType,pi_oDHTML, pi_sStringValue)
		{

			//-----------------------------------GM--
			// wenn Objekt ungültig ist,
			// dann Funktion verlassen
			//-----------------------------------GM--
			if(typeof(pi_oDHTML)=="undefined" || pi_oDHTML == null)
				return;
				
				
			if (pi_sCommandType == DECMD_INSERTTEXT)
			{
			 //---------------------------------GM--
			 // selbstedefinierte commands
			 //---------------------------------GM--
				//pi_oDHTML.DOM.selection.clear();
				var l_oSel = pi_oDHTML.DOM.selection.createRange();
				l_oSel.parentElement().innerHTML += pi_sStringValue;
				//l_oSel.innerHTML += pi_sStringValue;
			 
			}
			else
			{
				pi_oDHTML.ExecCommand(pi_sCommandType);
			}
		}


		function copyContent(pi_oDocument)
		{
			var l_oSourceElement = document.getElementById("divContent");
			var l_oTargetElement = document.getElementById("txtContent");
			
			//alert (l_oSourceElement);
			//alert (l_oTargetElement);
			if (isValid(l_oTargetElement) && isValid(l_oSourceElement))
			{
				l_oTargetElement.value = l_oSourceElement.innerHTML;
			}

			var l_oSourceElement = document.getElementById("divHeadline");
			var l_oTargetElement = document.getElementById("txtHeadline");
			
			//alert (l_oSourceElement);
			//alert (l_oTargetElement);
			if (isValid(l_oTargetElement) && isValid(l_oSourceElement))
			{
				l_oTargetElement.value = l_oSourceElement.innerHTML;
			}

		}

function getElement(pi_oDocument, pi_sElementID)
{
	var l_oElement = null;

	if (isValid(pi_oDocument) && isValid(pi_sElementID))
	{
		//--------------------GM--
		// if IE 4.00
		//--------------------GM--
		if (isValid(document.all) && !isValid(document.getElementById))
		{
			//l_oElement = document.all.item(pi_sElementID);
			l_oElement = document.body.all(pi_sElementID);
		}
		else
		{
			//--------------------GM--
			// if IE 5.x or NS 6.x
			//--------------------GM--
			if (isValid(document.getElementById))
			{
				l_oElement = pi_oDocument.getElementById(pi_sElementID);
			}
		}
	}//if (isValid(pi_oDocument))
	return l_oElement;
}
/*
'----------------------------------------------GM--
' Author:						Gina Mako
' Date-Written:					04.05.2006
'
' for inernal calls
'----------------------------------------------GM--
*/
function showLayer(pi_sLayerName, x, y)
{
	var l_oLayer = getLayer(pi_sLayerName);
	if (isValid(l_oLayer))
	{
		l_oLayer.style.position = "absolute";
		l_oLayer.style.top = y + "px";
		l_oLayer.style.left = x + "px";


		if (is_nav6up || is_fx || is_moz || is_ie6up) 
		{
		  l_oLayer.style.visibility = "visible"; 
		  return;
		}
		if (is_ie4up) 
		{
		l_oLayer.style.visibility = "visible";
		  return;
		}
		if (is_nav4up && !is_nav6up) 
		{
		  l_oLayer.visibility = "show";
		  return;
		}
	} //if (isValid(l_oLayer))
}
/*
'----------------------------------------------GM--
' Author:						Gina Mako
' Date-Written:			
'
' for internal calls
'----------------------------------------------GM--
*/
function hideLayer(pi_sLayerName) 
{
	if (is_ie4up) 
	{
	  document.all[pi_sLayerName].style.visibility = "hidden";
	}
	
	if (is_nav4up && !is_nav6up) 
	{
	  document.layers[pi_sLayerName].visibility = "hide";
	}
	
	if (is_nav6up || is_fx || is_moz) 
	{
	  document.getElementById([pi_sLayerName]).style.visibility = "hidden";
	}
}

/*
'----------------------------------------------GM--
' Author:						Gina Mako
' Date-Written:					23.04.2006
'
' for inernal calls
'----------------------------------------------GM--
*/
function getLayer(pi_sLayerName)
{
	if (is_nav6up || is_fx || is_moz || is_ie6up) 
	{
		return document.getElementById(pi_sLayerName); 
	}

	if (is_ie4up) 
	{
		return document.all[pi_sLayerName];
	}
	
	if (is_nav4up && !is_nav6up) 
	{
		return document.layers[pi_sLayerName];
	}
}

/*
'----------------------------------------------GM--
' Author:							Gina Mako
' Date-Written:				09.05.2006
'
' for inernal calls
'----------------------------------------------GM--
*/
function getLayerByAttribute(pi_sAttributeName, pi_sAttributeValue)
{
	var l_oLayerCollection;
	var l_oLayer;

	if (is_nav6up || is_fx || is_moz || is_ie6up) 
	{
		l_oLayerCollection = document.getElementsByTagName("div"); 
	}

	if (is_ie4up) 
	{
		//return document.all[pi_sLayerName];
		l_oLayerCollection = document.getElementsByTagName("div"); 
	}
	
	if (is_nav4up && !is_nav6up) 
	{
		l_oLayerCollection = document.layers;
	}
	
	if (isValid(l_oLayerCollection))
	{
		for(var i = 0 ; i < l_oLayerCollection.length; i++)
		{
			l_oLayer = l_oLayerCollection[i];
			if (isValid(l_oLayer.attributes[pi_sAttributeName]) && l_oLayer.attributes[pi_sAttributeName] == pi_sAttributeValue)
			{	
				return l_oLayer;
			} //if (isValid(l_oLayer.attributes[pi_sAttributeName]) && l_oLayer.attributes[pi_sAttributeName] == pi_sAttributeValue)
		}
	} //if (isValid(l_oLayerCollection))
}


var g_bOP5x	= /opera 5|opera\/5/i.test(navigator.userAgent)	? true : false;
var g_bIE		= !g_bOP5x && /msie/i.test(navigator.userAgent)	? true : false;	// preventing opera to be identified as ie
var g_bMAC	= navigator.platform == "MacPPC"								? true : false;

//var g_bNS6	= !g_bOP5x && /mozilla\/5/i.test(navigator.userAgent)						? true : false;	// preventing opera to be identified as mz
//var g_bNS		= !g_bOP5x && !g_bIE && /mozilla\/4/i.test(navigator.userAgent) ? true : false;
var l_sBrowserVersion = navigator.appVersion;
l_sBrowserVersion = l_sBrowserVersion.substr(0,3);
var g_bNS6 = false;
if(l_sBrowserVersion == "5.0" && navigator.appName == "Netscape")
{
	 g_bNS6 = true;
}

var g_bNS = navigator.appName == "Netscape";
var g_iBrowserVersion = navigator.appVersion;

