<!-- Begin
function right(e) 
{
	if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))
		return false;
	else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) 
	{
		alert("All content and images ©2005 www.costumestar.com.");
		return false;
	}
	return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_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];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// Shows/hides layers.  
function MM_showHideLayers() { 
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-1); i+=2) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+1];
    if (obj.style) { 
		  obj=obj.style; 
			v=(v=='show')?'visible':(v=='hide')?'hidden':v; 
		}
    obj.visibility=v; 
	}
}
// Shows/hides Select controls.  This is needed because Selects ignore z-index weights on layers.  So they always show 
// through layers.
function toogleSelects(v) { 
  if (document.forms.length > 0) {
    v=(v=='show')?'visible':(v=='hide')?'hidden':v; 
    for (var i=0; i < document.forms[0].elements.length; i++) {
      if (document.forms[0].elements[i].type == 'select-one') {
        obj=document.getElementById(document.forms[0].elements[i].name);
        obj.style.visibility=v; 
      }
    }
  }
}

// physically positions an element identified by 'tag' on the live mouse X axis.  Y is a constant passed in as vertOffset
function positionX(tag, vertOffset) {
  var obj = this.document.getElementById(tag);
  if (!obj) {
    return;
  }
	obj.style.left = (_x - 25) + 'px';
  obj.style.top = vertOffset + 'px';
}
 
// physically positions an element identified by 'showTag' on the browser page.  The exact spot is based on the location
//  of the baseTag or parent.  This is used to move sub-menus to the correct location before making them visible.
function positionXY(baseTag, showTag, vertOffset, itemHeight, menuWidth, leftRight) {
  var showObj = this.document.getElementById(showTag);
  var baseObj = this.document.getElementById(baseTag);
  if (!showObj) {
    return;
  }

	if (document.all) { // grab the x-y pos.s if browser is IE
      tempY = event.clientY 
	} else {  // grab the x-y pos.s if browser is NS
      tempY = Event.MOUSEMOVE.pageY
	}  
  if (leftRight == 'L') {
    menuWidth *= -1;
  }
	saveTempY = tempY;
	tempY = parseInt((tempY - vertOffset) / itemHeight);
	tempY = tempY * itemHeight + vertOffset;
	if (tempY >= saveTempY -1)
	  tempY -= itemHeight;

	tempX = parseInt(baseObj.style.left.replace('px','')) + menuWidth;
	showObj.style.left = tempX + 'px';
  showObj.style.top = (tempY) + 'px';
}

var _x;
var _y;
var isIE = document.all?true:false;
if (!isIE) {
  document.captureEvents(Event.MOUSEMOVE);
}

// track the mouse X  and Y positions
document.onmousemove = getMousePosition;
function getMousePosition(e) {
  if (isIE) {
    _x = event.clientX + document.body.scrollLeft;
    _y = event.clientY + document.body.scrollTop;
  }
  else {
    _x = e.pageX;
    _y = e.pageY;
  }
}
 
// move an element to the location of the mouse  
 function positionElementOnXY(el) {
    document.getElementById(el).style.left = _x;
    document.getElementById(el).style.top = _y;
 }

 // Intercept all mouse clicks if the Shift/Ctrl/Alt keys are being held down
 document.onmousedown = mouseDown;
 function mouseDown(e) {
 var ctrlPressed=0;
 var altPressed=0;
 var shiftPressed=0;
 if (navigator.appName=="Netscape") {
   var mString =(e.modifiers+32).toString(2).substring(3,6);
   shiftPressed=(mString.charAt(0)=="1");
   ctrlPressed =(mString.charAt(1)=="1");
   altPressed  =(mString.charAt(2)=="1");
  }
  else {
   shiftPressed=event.shiftKey;
   altPressed  =event.altKey;
   ctrlPressed =event.ctrlKey;
  }
	if (shiftPressed && altPressed && ctrlPressed) {
	  location.href = 'linkBuilderStart.do';
	}
}

// Reuasable function to prevent multiple page submits.  The function hides the Submit button and displays a 
//  "Processing...Please Wait" message with a red border.
var submittedFlag = 'N';
function showProcessing() {
  if (submittedFlag == 'N') {
    _x -= 10;
    _y -= 10;
    positionElementOnXY('styleHid');
		MM_showHideLayers('styleVis','hide','styleHid','show');
		submittedFlag = 'Y';
		return true;
	}
	else {
		return false;
	}
}

// The next 2 methods are used to make text flash by changing colors at a specified interval.  Below we
// toggle between blue and black to get the user's attention.  We use the DOM to control the style attributes.
var attentionNum=0;
function startAttentionTimer(milliSeconds) {
	setInterval("attentionUpdate()", milliSeconds);
}

function attentionUpdate() 
{
 if (attentionNum % 2 == 0)	{
	 document.getElementById("attention").style.color = '#000000';													 
 }
 else {
	 document.getElementById("attention").style.color = '#0000ff';
 }
 attentionNum++;
}
//-->