if(typeof dontDetectFlash == 'undefined') dontDetectFlash = false;
if(!dontDetectFlash){
var MM_contentVersion = 8;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < words.length; ++i)
{
 if (isNaN(parseInt(words[i])))
 continue;
 var MM_PluginVersion = words[i];
}
 var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
&& (navigator.appVersion.indexOf("Win") != -1)) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next \n');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
}
}



/********
* Timeout Warning
********/
function ShowTimeoutWarning ()
{
    window.alert( "You will be automatically logged out in five minutes unless you do something!" );
}




/********
* displays flash content or alternate
* content is flash not detected.
********/

function getFlash(width, height, file, loop, alternate, classid, usemap)
{
 if (MM_FlashCanPlay)
{
var curProtocol = "http:";
if (null != top.location.protocol && top.location.protocol=='https:')
{
curProtocol = "https:";
}
var oeTags = '<OBJECT CLASSID="' + classid + '"'
+ 'WIDTH="' + width + '" HEIGHT="' + height + '"'
+ 'CODEBASE="' + curProtocol + '//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0">'
+ '<PARAM NAME="MOVIE" VALUE="' + file + '">'
+ '<PARAM NAME="PLAY" VALUE="true">'
+ '<PARAM NAME="LOOP" VALUE="' + loop + '">'
+ '<PARAM NAME="QUALITY" VALUE="high">'
+ '<PARAM NAME="MENU" VALUE="false">'
+ '<PARAM NAME="WMode" VALUE="transparent">'
+ '<EMBED wmode="transparent" SRC="' + file + '"'
+ 'WIDTH="' + width + '" HEIGHT="' + height + '"'
+ 'PLAY="true"'
+ 'LOOP="' + loop + '"'
+ 'QUALITY="high"'
+ 'MENU="false"'
+ 'TYPE="application/x-shockwave-flash"'
+ 'PLUGINSPAGE="' + curProtocol + '//www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'
+ '</EMBED>'
+ '</OBJECT>';
document.write(oeTags);
}
}



/* Begin Item Menu */

var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var enableanchorlink=0 //Enable or disable the anchor link when clicked on? (1=e, 0=d)
var hidemenu_onclick=1 //hide menu when user clicks within menu? (1=yes, 0=no)

/////No further editting needed

var ie5=document.all
var ns6=document.getElementById&&!document.all

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function showhide(obj, e, visible, hidden){
if (ie5||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie5 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie5 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie5 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function tsgdropdownmenu(obj, e, dropmenuID){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
if (typeof dropmenuobj!="undefined") //hide previous menu
dropmenuobj.style.visibility="hidden"
clearhidemenu()
if (ie5||ns6){
obj.onmouseout=delayhidemenu
dropmenuobj=document.getElementById(dropmenuID)
if (hidemenu_onclick) dropmenuobj.onclick=function(){dropmenuobj.style.visibility='hidden'}
dropmenuobj.onmouseover=clearhidemenu
dropmenuobj.onmouseout=ie5? function(){ dynamichide(event)} : function(event){ dynamichide(event)}
tsgshowhide(dropmenuobj.style, e, "visible", "hidden")
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}
return clickreturnvalue()
}

function tsgshowhide(obj, e, visible, hidden){
if (ie5||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function dropdownmenu(obj, e, dropmenuID){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
if (typeof dropmenuobj!="undefined") //hide previous menu
dropmenuobj.style.visibility="hidden"
clearhidemenu()
if (ie5||ns6){
obj.onmouseout=delayhidemenu
dropmenuobj=document.getElementById(dropmenuID)
if (hidemenu_onclick) dropmenuobj.onclick=function(){dropmenuobj.style.visibility='hidden'}
dropmenuobj.onmouseover=clearhidemenu
dropmenuobj.onmouseout=ie5? function(){ dynamichide(event)} : function(event){ dynamichide(event)}
showhide(dropmenuobj.style, e, "visible", "hidden")
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}
return clickreturnvalue()
}

function clickreturnvalue(){
if ((ie5||ns6) && !enableanchorlink) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie5&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("dropmenuobj.style.visibility='hidden'",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

/* End Item Menu */




/* BEGIN Inner Row Hover */

	var hoverObj = false;
	var hoverCObj = false;
	var hoverTimer = false;
	var hoverLastStoneID = 0;
	var hoverLoading = "<table width='140' border='0' cellspacing='1' cellpadding='3'  Class=Normal><tr><td class=Tier1StoneListItemOver>Items#: </td></tr><tr>  <td class=Tier1StoneListItemOver>Depth %:</td></tr><tr><td class=Tier1StoneListItemOver>Table %:</td></tr><tr><td class=Tier1StoneListItemOver>Girdle:</td></tr><tr><td class=Tier1StoneListItemOver>Culet:</td></tr><tr><td class=Tier1StoneListItemOver>Measurements:<br /></td></tr></table>";
	function initHover()
	{
		if (!hoverObj)
		{
			hoverCObj = document.getElementById('objHoverContent');
			hoverObj = document.getElementById('objHoverContainer');
		}
	}
	function showHover(mID,t,l)
	{
		initHover();	
		if (hoverLastStoneID!=mID)
		{
			hoverLastStoneID=mID;
			hoverCObj.innerHTML = hoverLoading;
			lxFetch(987,0,'ItemID=' + mID,'objHoverContent');
		}
		hoverObj.style.top = (t - 73) + 'px';
		hoverObj.style.left = (l - 180) + 'px';
		hoverObj.style.display = 'block';
	}
	function iH(mID,obj,alt)
	{
		obj.className='gRo';
		window.status='showHover(' + mID + ',' + obj.offsetTop + ',' + obj.offsetLeft+ ');';
		hoverTimer = window.setTimeout('showHover(' + mID + ',' + obj.offsetTop + ',' + obj.offsetLeft+ ');',250);
	}
	function oH(mID,obj,alt)
	{
		if(!alt)
		{ obj.className='gR'; }
		else
		{ obj.className='gRa'; }

		window.clearTimeout(hoverTimer);
		initHover();
		hideHover(mID);
	}
	function hideHover(mID)
	{
		hoverObj.style.display = 'none';
	}

/* End Inner row Hover*/



function mzExpander(srcText, parentId, tagType, attributeName, autoHide, showAll, showChild)
{
	var strOpenFldrs = '';
	var j=0;
	var parentObj = document.getElementById(parentId);
	if (parentObj){
		var childTags = parentObj.getElementsByTagName(tagType);
		for (var i = 0; i < childTags.length; i++){
			var childName = childTags[i].getAttribute(attributeName);
			if (childName){
				var isExpander = (childName == srcText);
				var isChildExpander = (showChild == true && childTags[i].getAttribute(attributeName).indexOf(srcText) == 0);
				if (isExpander ||  isChildExpander ||  showAll == true){
						if (childTags[i].style.display != 'none'){
							if (isExpander){
							 childTags[i].style.display='none';
							 if(document.getElementById(childName) != null) document.getElementById								(childName).style.backgroundImage = 'url(/images/plusfldr.gif)';
							}
						}
						else {
							childTags[i].style.display = 'block'; 
							if(document.getElementById(childName) != null) document.getElementById							(childName).style.backgroundImage = 'url(/images/minusfldr.gif)';
						}
				}
				else if (autoHide == true){
					childTags[i].style.display = 'none';
					if(document.getElementById(childName) != null) document.getElementById(childName).style.backgroundImage = 'url					(/images/plusfldr.gif)';
				}
			}
			if (childTags[i].style.display == 'block')
				if (j!=1){
					//strOpenFldrs = strOpenFldrs + '\'' + childName + '\'';
					strOpenFldrs = strOpenFldrs + childName;
					j=1;
				}
				else
					//strOpenFldrs = strOpenFldrs + ',\'' + childName + '\'';
					strOpenFldrs = strOpenFldrs + ',' + childName;
		}
	}
	//document.Form.OpenFldrs.value = strOpenFldrs;

if (showAll == true)  //save expand in form form page navigation
	document.Form.ShowAll.value = 'block';
else
	document.Form.ShowAll.value = 'none';
}


/*  COSIS PRINT COUPON */
function PrintCoupon(ID) 
{ 
	day = new Date(); 
	id = day.getTime(); 
	eval("page" + id + " = window.open('/DesktopModules/TSG.MemberDirectory/PrintCoupon.aspx?ID=" + ID+ "', '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=700,height=440,left = 290,top = 312');"); 
} 



