var img=new Image();

img.src='http://www.getitglobal.com/images/navRollover.jpg';



function CngBG(obj,nc){

 obj.nc=obj.className;

 obj.className=nc;

 obj.onmouseout=function(){ this.className=this.nc; }

}





function popUpWindow(url, width, height, resizable, scrollbars){

	if (arguments.length == 1){

		width = 335;

		height = 370;

		resizable = "yes";

		scrollbars = "yes";

	}else if (arguments.length == 3){

		resizable = "no";

		scrollbars = "no";

	}else if (arguments.length == 4){

		scrollbars = "no";

	}



	var win = window.open(url, "PopUp", "width=" + width + ",height=" + height + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",menubar=no,toolbar=no,left=20,top=20");

}



<!--

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_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_findObj(n, d) { //v4.01

  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 && d.getElementById) x=d.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];}

}



// Random Image Generator

var image = new Array(

	'21',

	'21',

	'21'

);



var n = image.length;



function RandomImage() {

    return(image[Math.floor(Math.random()*n)]);

}



function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}



function rollon() {

el = event.srcElement ;

if (el.getAttribute("roll") != null) {

el.className = "onit" ;

}

}



function rolloff() {

el = event.srcElement ;

if (el.getAttribute("roll") != null) {

el.className = "offit";

}

}



document.onmouseover = rollon ;

document.onmouseout = rolloff ;



function loadFooter(){

	document.write("<div align='center' class='footerCopyWhite'>Have a suggestion? <a href='contact.html'><span  class='footerCopyWhite'>Contact Us</span></a> | <a href='#' onClick=\"javascript:popUpWindow('pop_privacy.html',500,500,'yes','yes');\"><span  class='footerCopyWhite'>Privacy</span></a> | &copy; Victoria's Secret. All rights Reserved.</div>");

}





function loadNav(section) {



	//preloadSubNav(section);

	

	arNav = new Array;

	arNav[0] = new Array("about");

	



	expandSection = -1;

	output = "";



	for (i=0; i < arNav.length; i++) {

		for(j=0; j < arNav[i].length; j++) {

			if (section == arNav[i][j]) {

				expandSection = i;

			}

		}

	} j=0; i=0;

	

	for (i=0; i < arNav.length; i++) {

		for(j=0; j < arNav[i].length; j++) {

			if (j == 0) { // main nav item

				path = "images/mainNav_";

				isMainNav = true;

			} else { // sub nav item

				path = "images//subNav_";

				isMainNav = false;

			}

			

			arImg = new Array();

			arImg[0] = new Image();

			arImg[0].src = path + arNav[i][j] + "_off.gif";

			arImg[1] = new Image();

			arImg[1].src = path + arNav[i][j] + "_on.gif";

			arImg[2] = new Image();

			arImg[2].src = path + arNav[i][j] + "_over.gif";

			onLoadState = new Image();

			if (section == arNav[i][j] || (expandSection == i && isMainNav == true)) {

				onLoadState.src = arImg[1].src; // on-state

				offState = "on";

				overState = "over";

			} else {

				onLoadState.src = arImg[0].src; // off-state

				offState = "off";

				overState = "over";

			}

			if (section == arNav[i][0]) {

				

				output = output + "<td><a href='" + arNav[i][j] + ".php' onmouseover=\"window.status='" + arNav[i][j] + "';return true\" onmouseout=\"window.status=' ';return true\"><img src='" + onLoadState.src + "' name='" + arNav[i][j] + "' border='0' alt='" + arNav[i][j] + "'></a></td>";



				} else {

				output = output + "<td><a href='" + arNav[i][j] + ".php' onmouseover=\"chgImg('" + path + "','" + arNav[i][j] + "','" + overState + "');window.status='" + arNav[i][j] + "';return true\" onmouseout=\"chgImg('" + path + "','" + arNav[i][j] + "','" + offState + "');window.status=' ';return true\"><img src='" + onLoadState.src + "' name='" + arNav[i][j] + "' border='0' alt='" + arNav[i][j] + "'></a></td>";	

				//}

			}

		} // end for

	} // end for

	document.write(output);	





} // end function loadNav





// The function that does the image-swap

function chgImg(path,section,state) {

	if (getAppVersion()) {

		document[section].src = path + section + "_" + state + ".gif"; 

	}

} // end function chgImg





// The function to sniff out a browser that can do image-swaps

function getAppVersion(){

	appname= navigator.appName;

	var appversion = navigator.appVersion;

	majorver = appversion.substring(0, 1);

	if ( (appname == "Netscape") && ( majorver >= 3 ) ) return 0;

	if ( (appname == "Microsoft Internet Explorer") && (majorver >= 4) ) return 1;

	return -1;

} // end function getAppVersion



getAppVersion();







function show() {

stra = window.location.search.substr(1).split("&"); 

where = stra[0].split("=");

return where[1];

}





function changeIt()

{

	// Ref: http://www.quirksmode.org/dom/changess.html

	if (!document.styleSheets) return;

	var theRules = new Array();

	if (document.styleSheets[1].cssRules)

		theRules = document.styleSheets[1].cssRules

	else if (document.styleSheets[1].rules)

		theRules = document.styleSheets[1].rules

	else return;

	theRules[theRules.length-1].style.backgroundColor = 'transparent';

	//document.styleSheets[0].previewTable.style.setProperty('background','#00cc00',null);

}











function get_preview(font_size) {



	newText = document.createfrm.gtext.value; 

	var re = new RegExp ('\n', 'gi') ;

	var newText = newText.replace(re, 'chr(13)') ;

	//$text=wordwrap($text,$wrappos,"\n\r",0);

	

	newCredit = document.createfrm.qcredit.value;

	

	newBgColor = document.createfrm.bgColor.value; 

	newBgColor = newBgColor.substring(1, newBgColor.length); 



	newTextColor = document.createfrm.textColor.value; 

	newTextColor = newTextColor.substring(1, newTextColor.length); 

	

	newgwidth = document.createfrm.gwidth.value; 

	newgheight = document.createfrm.gheight.value; 

	

	newImg = 'phpimage.php?text='+newText+'   &font_file=' + document.createfrm.font.options[document.createfrm.font.selectedIndex].value + '&font_size='+ font_size +'&font_color='+ newTextColor +'&background_color=' + newBgColor; 

	document.preview.src = newImg;

	

}



//document.getElementById(id).style.visibility; 



function visibilityToggle(id) { 

 var el = document.getElementById(id).style; 

 if(el.visibility == "hidden") { 

 el.visibility = "visible"; 

 } 

 else if(el.visibility == "visible") { 

 el.visibility = "hidden"; 

 } 

 } 

 

 

 function displayToggle(id) { 

var el = document.getElementById(id).style; 

if(el.display == "none") { 

el.display = "block"; 

} 

else if(el.display == "block") { 

el.display = "none"; 

} 

} 



function save_filename() {

	//alert(this.value);

	filename=document.frm.file.value; 

	nameLen = filename.length; 

	lastSlashPos = filename.lastIndexOf("\\"); 

	document.frm.jpg.value = filename.substring(lastSlashPos+1, nameLen); 

	//alert('lastSlashPos:' + lastSlashPos + ' nameLen:' + nameLen + ' ' + document.frm.jpg.value);

}



/*

function toggleBox(szDivID, iState) // 1 visible, 0 hidden

{

    if(document.layers)	   //NN4+

    {

       document.layers[szDivID].visibility = iState ? "show" : "hide";

    }

    else if(document.getElementById)	  //gecko(NN6) + IE 5+

    {

        var obj = document.getElementById(szDivID);

        obj.style.visibility = iState ? "visible" : "hidden";

    }

    else if(document.all)	// IE 4

    {

        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";

    }

}

*/





function getListElemRefs( id )

{

  var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? getListLyrRef(id,document): null;

  if (el) el.css = (el.style)? el.style: el;

  return el;

}



function toggleBox(szDivID, iState) // 1 visible, 0 hidden

{

	/*

   var obj = document.layers ? document.layers[szDivID] :

   document.getElementById ?  document.getElementById(szDivID).style :

   document.all[szDivID].style;

   obj.visibility = document.layers ? (iState ? "show" : "hide") :

   (iState ? "visible" : "hidden");

   */

   

   

   var layer = getListElemRefs( szDivID );

   if( layer.css != null )

   {

     if( layer.css.visibility == 'visible' )

     {

       layer.css.visibility = 'hidden';

	   //layer.css.z-index:-1;

      //layer.css.position = 'absolute';

     }

     else

     {

       layer.css.visibility = 'visible';

	   //layer.css.z-index:1000;

       //layer.css.position = 'relative';

     }

   }



   

}



//-->


