﻿<!--
// Start Left expanding text menu script 
	        //var oldOpenID="Feat1";
	        var oldOpenID;
	        var oldopenTitle;
	        
	        function expandNewClick(sID,o){
	           // if (!oldopenTitle) oldopenTitle=document.getElementById('frstA');
	            
	            oToShow=document.getElementById(sID);
	            oToHide=document.getElementById(oldOpenID);
	            if (oldOpenID==sID) 
	                {
	                if (o.parentNode.className=="open")
	                    {
	                    oToShow.style.display="none";
	                    o.blur();
	                    o.parentNode.className="";
	                    }
	                else
	                    {
	                    oToShow.style.display="block";
	                    o.blur();
	                    o.parentNode.className="open";
	                    }
	                }
	            else 
	                {
	                if (oldopenTitle)oldopenTitle.className="";
	                if (o){o.blur(); o.parentNode.className="open";}
	                if (oToHide) oToHide.style.display="none";
	                if (oToShow) oToShow.style.display="block";
	                oldOpenID=sID;
	                oldopenTitle=o.parentNode;
	                }
	        }
// End left expanding text menu script

                function swapO(sName,displ){
                d = document
                if(d.getElementById){
                o = d.getElementById(sName)
                if(o){
                v = o.style.display
                o.style.display = (v!='none')?'none':displ; 
                }
                }
                }
                
 // change tab accounts           
	    var curr_open = "acc1";
	    var curr_liid = "liID1"
	    function chng_acc(divid,liid)
	    {
	            if ((curr_open != divid) && (curr_liid != liid)){
	                
	                var obj1 = document.getElementById(liid);  
	                var obj = document.getElementById(divid);
    	            
	                if (obj){
	                        obj.style.display = '';     
	                        obj1.style.color = "#D60000";
	                }	
	               var obj1 = document.getElementById(curr_liid);  
	               var obj = document.getElementById(curr_open);
                   if (obj){
                        obj.style.display = "none";
                        obj1.style.color = "#2C2C2C";
                   }           
                    curr_open = divid; 
                    curr_liid = liid;
               }
	    }
//end function change tabs	    


	        /** function FillDozen uses AJAX to  call the content for Featured Dozen area of the site
 * aid (int) - Artist ID, this parameter is available when the user select option from the artists drop-down
 * at (int)  - Artist Type - got this parameter from the promotion code that has taken the user to the site
 * divID (string) - id of the element where the result content will be fetch out
 * mode (int) - has values 1-for showing the Artists list drop-down, 2-changing one of the fields for artist details with the 
 *             details of the new one selected
 * sInd(int) - the index of the artist being chosen in the  Artists list drop-down. use to define in which container
 *              for artist detail  should be drop the content
 * bLoad2nd (boolean) - true-says that the current result content is the one that loads in the second content box under the Artists drop-down,  
 **/

function FillDozen(aid, at, divID, mode, sInd, bLoad2nd) {
    var ds, par, link;
    
  //  ds = "getCntProxy.asp"
ds="featsites_New.asp"
    if (mode == 1){
        par = 'aid='+ aid + '&at=' + at;
        if (sInd%2 == 0) divID+="_1"; else divID+="_2";
        /*
        if (bLoad2nd) {
            if (bLoad2nd%3 == 2){
                if (par.length>0) par+='&';
                par += 'ld2=1';
            }
        }
        */
	
        if (bLoad2nd) {
            if (!at){
                if (bLoad2nd%3 == 2){
                    if (par.length>0) par+='&';
                    par += 'ld2=1';
                }
            }
            else {
                if (bLoad2nd%3 == 1){
                    if (par.length>0) par+='&';
                    par += 'ld2=1';
                }
            }
        }
    }
    else 
        par = 'mode=2&at=' + at;

   // par = "l=" + escape("http://webfarm.foliolink.com/featsites.asp?"+ par);

    postGetData(ds, par, divID);
}

function postGetData(dataSource, data, divID)
{
    var XMLHttpRequestObject;
    if (window.XMLHttpRequest) {
        XMLHttpRequestObject = new XMLHttpRequest()
    }else if (window.ActiveXObject){
        XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP")
        }

    if(XMLHttpRequestObject) {
        var obj = document.getElementById(divID);
	try{
	//netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');
        XMLHttpRequestObject.open("POST", dataSource);
       
XMLHttpRequestObject.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
        XMLHttpRequestObject.onreadystatechange = function()
            {
                if (XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200) {
                    obj.innerHTML = XMLHttpRequestObject.responseText;
                } 
            }
        XMLHttpRequestObject.send(data);
	}
	catch (e) {
		//alert('Error ' + e.message + ' occurred.');
	}
    }
}

  var oldImgToShow,oldLiID,content; 
    oldLiID = 'FP';
     
    
    function imgChange(imgSRC,txtcontent,liID) {
        
        
        oldImgToShow = document.getElementById('showIMG');
        content = document.getElementById('putContent');
        oToShow = document.getElementById(liID);
        oToHide = document.getElementById(oldLiID); 
        
        if (imgSRC && oldImgToShow) {
        
                //if (oldImgToShow.src!=imgSRC){
                    
                    if (typeof(oldImgToShow.blur)=='function'){
                    oldImgToShow.blur();
                    } 
                    oldImgToShow.src = imgSRC;
                    if (content) content.innerHTML=txtcontent;
                                      
                    if (oToShow.className!="") oToShow.className=oToShow.className+" on";
                    else oToShow.className="on";
                    
                    if (oToHide.className=="on") oToHide.className="";
                    else {
                        if (oToHide.className=="end on") oToHide.className="end";
                    
                    }
                    oldLiID=liID;
                //}
        }
        
        return false;
    }

//-->

