

function redirect() {
    //  hideShow('kurtis');
    // hideShow('suits');
    //hideShow('skirts');
    //hideShow('bridalcollection');

    //hideShow('jewelry');
    window.location.href = "http://tajcottage.com/cgi/alltest.pl?type=arrival&prodId=201000&pageNo=1";
}

function redirectFlyer() {
     window.location.href = "http://tajcottage.com/megasale.html";
}


function doBlink() {
  // Blink, Blink, Blink...
  var blink = document.all.tags("BLINK")
  for (var i=0; i < blink.length; i++){
    blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : "" ;

   }
}

function jm_MapQuest(country, address, city, state, zip) {
//Joel Martinez 2001
  window.open("http://www.mapquest.com/maps/map.adp?country="+ escape(country) +"&address="+ escape(address) +"&city="+ escape(city) +"&state="+ escape(state) +"&zipcode="+ escape(zip) +"&homesubmit.x=0&homesubmit.y=0","jm_mapquestwin","width=790,height=400,toolbar=1,menubar=1,status=1,resizable=1,location=0,directories=0,scrollbars=1");
}

function startBlink() {
  // Make sure it is IE4
  if (document.all)
    setInterval("doBlink()",500)
}




function hideShow(toggleid)
	{

	    var divStat= new Array(5);
    
            divStat[0]="kurtis";
            divStat[1]="suits";
            divStat[2]="skirts";
            divStat[3]="jewelry";
	    divStat[4]="bridalcollection";


	    for ( x=0; x<5; x++){

		//alert(divStat[x] + ' ' + toggleid);
	    if ( divStat[x]==toggleid){
	
		
		if (document.getElementById) { // DOM3 = IE5, NS6
           
		    if ( document.getElementById(toggleid).style.display == 'none'){

			document.getElementById(toggleid).style.display = ''; 
        
		    }else
			document.getElementById(toggleid).style.display = 'none';
		}
		else {
		    if (document.layers) { // Netscape 4
			if (  document.toggleid.display == 'none')
			    document.toggleid.display = '';
			else
			    document.toggleid.display = 'none';
        
		    }
		    else { // IE 4
			if ( document.all.hideid.style.display == 'none')
			    document.all.hideid.style.display = '';
			else
			    document.all.showid.style.display = 'none';

		    }
		}
	    }
		else{
		    if (document.getElementById) { // DOM3 = IE5, NS6
           
       
			document.getElementById(divStat[x]).style.display = 'none';
		    }
		    else {
			if (document.layers) { // Netscape 4
                              
			    document.divStat[x].display = 'none';
        
			}
			else { // IE 4
                               
			    document.all.showid.style.display = 'none';

			}


		    }

		} 

	    }  

	    }






 function wopen(url, name, w, h)
{
// Fudge factors for window decoration space.
 // In my tests these work well on all platforms & browsers.
w += 32;
h += 96;
 var win = window.open(url,
  name,   ',width=' + w + ', height=' + h + ', ' +
  'location=no, menubar=yes, ' +
  'status=yes, toolbar=yes, scrollbars=yes, resizable=yes');
 win.resizeTo(w, h);
 win.focus();
}

function riddle_me_this(){
    //    alert('onload function');
    //var GET = {};
var loc = String(document.location);
var pieces = loc.substr(loc.indexOf('?') + 1).split('&');
if (pieces.length>=0){
    var keyVal = pieces[0].split('=');
    if ( keyVal[1].indexOf("^") > 0){
    var dir=keyVal[1].split('^');
    var firstDir=dir[0];
    hideShow(firstDir);
  //   if ( dir == "kurtis")
// 	hideShow('kurtis');
//     else
// 	if ( dir == ('suits')
// 	     hideShow('suits');
//         else
// 	    if (dir == ('skirts')
// 		hideShow('skirts'
    //alert(keyVal[0] + ' ' + keyVal[1] + ' ' + firstDir);
}

}


}
