
function assy(url){
	//2003-0118 no longer used
	popup1(url,"assy","width=400,height=430,top=100,left=100,toolbar=no,menubar=no,titlebar=yes,location=no,status=no,scrollbars=auto,resizable=yes");
	//popup1(url,"assy","titlebar=yes,location=yes,status=yes,width=400,height=300");
}


function popup1(url, winName, options){
	var winPopup2;
	//winPopup = window.open(url, winName, "toolbar=no,menubar=no,titlebar=yes,location=no,status=no,scrollbars=auto,resizable=yes,top=170,left=130,height=550,width=300");
	winPopup2 = window.open(url, winName, options);
	winPopup2.focus();
}


function subWindow() {
    //("winName", width, height, "OpenPageURL")
    //all arguments are optional; however at least one is required
    // use in html: <a class="myclassname" href = "http://www.DomainName.com" onclick="subWindow('newWinName', 300, 320)" target = "newWinName">Text To Display</a>


    if (arguments.length < 1) {
        alert("this function called with " + arguments.length + " arguments, but at least 1 argument is expected.");
        return null;
    }
    var widthval = arguments[1] != null ? arguments[1] : 640;
    var heightval = arguments[2] != null ? arguments[2] : 480;
    var OpenPageURL = arguments[3] != null ? arguments[3] : "";
    var dimensions = "directory=0,height="+heightval+",width="+widthval+
                     ",left=30,top=80,location=0,resizable=1,statusbar=0,hotkeys=0,menubar=0,scrollbars=1,status=0,toolbar=0";
    var newWindow = window.open(OpenPageURL,arguments[0],dimensions);
    if (!OpenPageURL) {
        newWindow.document.write("<title>TheBroadcastShop.com</title>")
        newWindow.document.write("<center><font size='4' color='red'>Loading, Please Wait...</font></center>")
        //newWindow.focus()
    }
    newWindow.focus()
    return;
}


function newWindow() {
    //("winName", width, height, "OpenPageURL")
    //all arguments are optional; however at least one is required
    //differs from above code: directory=yes; statusbar=yes; menubar=yes; hotkeys=yes; toolbar=yes; status=yes


    if (arguments.length < 1) {
        alert("this function called with " + arguments.length + " arguments, but at least 1 argument is expected.");
        return null;
    }
    var widthval = arguments[1] != null ? arguments[1] : "";
    var heightval = arguments[2] != null ? arguments[2] : "";
    var OpenPageURL = arguments[3] != null ? arguments[3] : "";
    var dimensions = "directory=1,height="+heightval+",width="+widthval+
                     ",left=30,top=80,location=1,resizable=1,statusbar=1,hotkeys=1,menubar=1,scrollbars=1,status=1,toolbar=1";
    var newWindow = window.open(OpenPageURL,arguments[0],dimensions);
    //if (!OpenPageURL) {
    //    newWindow.document.write("<title>TheBroadcastShop.com</title>")
    //    newWindow.document.write("<center><font size='4' color='red'>Loading, Please Wait...</font></center>")
        newWindow.focus()
    //}
    return;
}

function newWindow2() {
    //("winName", width, height, "OpenPageURL")
    //all arguments are optional; however at least one is required
    //differs from above code: directory=yes; statusbar=yes; menubar=yes; hotkeys=yes; toolbar=yes; status=yes


    if (arguments.length < 1) {
        alert("this function called with " + arguments.length + " arguments, but at least 1 argument is expected.");
        return null;
    }
    var widthval = arguments[1] != null ? arguments[1] : "640";
    var heightval = arguments[2] != null ? arguments[2] : "480";
    var OpenPageURL = arguments[3] != null ? arguments[3] : "";
    var dimensions = "directory=1,height="+heightval+",width="+widthval+
                     ",left=30,top=80,location=1,resizable=1,statusbar=1,hotkeys=1,menubar=1,scrollbars=1,status=1,toolbar=1";
    var newWindow = window.open(OpenPageURL,arguments[0],dimensions);
    if (!OpenPageURL) {
        newWindow.document.write("<title>TheBroadcastShop.com</title>")
        newWindow.document.write("<center><font size='4' color='red'>Loading, Please Wait...</font></center>")
        newWindow.focus()
    }
    return;
}



function helpWin(surl) {

    var dimensions = "directory=1,height=230,width=430,"+
                     "left=30,top=80,location=0,resizable=1,statusbar=0,hotkeys=0,menubar=0,scrollbars=1,status=0,toolbar=0";
    var newWindow = window.open(surl,'help',dimensions);
    newWindow.focus()
    return;
}

function pixWin(surl) {

    var dimensions = "directory=1,height=350,width=450,"+
                     "left=30,top=80,location=0,resizable=1,statusbar=0,hotkeys=0,menubar=0,scrollbars=1,status=0,toolbar=0";
    var newWindow = window.open(surl,'pixWin',dimensions);
    newWindow.focus()
    return;
}

function pixWin2(surl) {

    var dimensions = "directory=1,height=550,width=700,"+
                     "left=30,top=80,location=0,resizable=1,statusbar=0,hotkeys=0,menubar=0,scrollbars=1,status=0,toolbar=0";
    var newWindow = window.open(surl,'pixWin',dimensions);
    newWindow.focus()
    return;
}


function fgoURL(surl)
{
	window.location.href=surl;
}


function rollover(img, img_src){
  //img = imageName i.e. <img src="arrow.gif" name="NameForThisImageElement">
  //use1: onMouseover="rollover('linkbuttonSales', 'buttonSales-on.gif')" 
  //use2: onMouseout="rollover('linkbuttonSales', 'buttonSales-off.gif')">
  var objStr,obj;
  if(document.images){
    if (typeof(img) == 'string') {
      objStr = 'document.' + img;
      obj = eval(objStr);
      obj.src = img_src;
      //obj.style.cursor="hand";
    } else if ((typeof(img) == 'object') && img && img.src) {
      img.src = img_src;
    }
  }
}


//--------------
//For style/css
//--------------

function styleSet(fID, fElement, fValue) {
	//alert(getbStyleObj(fID)+"."+fElement+"=\""+fValue+"\"")
	eval(getbStyleObj(fID)+"."+fElement+"=\""+fValue+"\"");
}


function styleHide(fID) {
	styleSet( fID,"visibility",getbVisibility("hide") )
}


function styleShow(fID) {
	styleSet( fID,"visibility",getbVisibility("show") )
}


function styleShowHide(fID) {
	var o
	var show
	var hide
	o = eval(getbStyleObj(fID)+".visibility")
	show = getbVisibility("show")
	hide = getbVisibility("hide")
	
	if (o==hide) {
		//alert("hidden")
		//alert(show)
		styleSet(fID,"visibility",show)
	}
	else {
		//alert("visible")
		//alert(hide)
		styleSet(fID,"visibility",hide)
	}
}


function ChangeCssClassProperty(fClass,fElement,fValue) {
	//ONLY WORKS WITH LINKED STYLE SHEETS, for local styles, use styleSet with ID
	//use:
	//<p class="myclass">paragraph with style myclass</p>
	//<div onclick="ChangeCssClassProperty('.myclass','backgroundColor','yellow')">show css</div>
	//
	
	var CSSRules
	if (document.all) {
		CSSRules = 'rules'		//IE
	}
	else if (document.getElementById) {
		CSSRules = 'cssRules'	//Mozilla
	}
	for (var i = 0; i < document.styleSheets[0][CSSRules].length; i++) {
		if (document.styleSheets[0][CSSRules][i].selectorText == fClass) {
			document.styleSheets[0][CSSRules][i].style[fElement] = fValue
		}
	}	
}


function getbVisibility(fShowOrHide) {
	//Returns No Quotes
	if (document.all) {					//IE
		if (fShowOrHide=="show") return "visible"
		else return "hidden"
	}
	else if (document.getElementById) {			//NN6 Mozilla Opera
		if (fShowOrHide=="show") return "visible"
		else return "hidden"
	}
	else if (document.layers) {				//NN4
		if (fShowOrHide=="show") return "show"
		else return "hide"
	}
}


function getbDocObj(fID) {
	//USE: eval(getbDocObj(elementid));
	if (document.all) {					//IE
		return "document.all[\""+ fID+"\"]";
	} else if (document.getElementById) {			//NN6 Mozilla Opera
		return "document.getElementById('"+fID+"')";
	} else if (document.layers) {				//NN4
		return "document.layers[\""+fID+"\"]";            
	}
}

function getbStyleObj(fID) {
	//USE: eval(getbStyleObj(elementid));
	if (document.all) {					//IE
		return "document.all[\""+fID+"\"].style";
	} else if (document.getElementById) {			//NN6 Mozilla Opera
		return "document.getElementById(\""+fID+"\").style";
	} else if (document.layers) {				//NN4
		return "document.layers[\""+fID+"\"].style";
	}
}

function styleIsVisible(fID) {
	var o
	var show
	var hide
	o = eval(getbStyleObj(fID)+".visibility")
	show = getbVisibility("show")
	hide = getbVisibility("hide")
	
	if (o==hide) {
		//alert("hidden")
		//alert(show)
		return (false);
	}
	else {
		//alert("visible")
		//alert(hide)
		return (true);
	}
}





function showHideBlock(fID) {
	//2008-0727
		//example use: <a href="#" onclick="toggleview('div1')">Hide/Unhide DIV</a>

   	fID = document.getElementById(fID);

   	if (fID.style.display == 'block' || fID.style.display == '')
   	   	fID.style.display = 'none';
   	else
      	fID.style.display = 'block';

   	return;
}



function showHideBlockAndText(fID, fIDText) {
	var ele = document.getElementById(fID);
	var text = document.getElementById(fIDText);
	if(ele.style.display == "block") {
    		ele.style.display = "none";
		text.innerHTML = "show";
  	}
	else {
		ele.style.display = "block";
		text.innerHTML = "hide";
	}
} 


//---------------
//For Images
//---------------

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
  //<img src="/images/image.gif" alt="" name="Image1" border="0" id="Image1">
  //onMouseOver="MM_swapImage('Image1','','/images/image_on.gif',1)" onMouseOut="MM_swapImgRestore()"
  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];}
}

//---------------



//-----------------
//For Milonic Menu
//-----------------

function hide_menu(mnu) { 
	mn=getMenuByName(mnu) 
	SDiv("menu"+mn,0) 
} 

function show_menu(mnu) { 
	mn=getMenuByName(mnu) 
	SDiv("menu"+mn,1) 
} 

//-----------------


//-----------------
//For SSL Cert Validation
//-----------------

function openCertDetails()
{
	
	var referer = "";
	var siteSealImage;

	if (self.sampleReferer) 
		referer = self.sampleReferer;
	else
		referer = window.location; 
	
	/*
	if (document.images) {
		siteSealImage = document.images["thawteSiteSeal"]
		siteSealImage.src="https://www.thawte.com/cgi/server/seal_generator.exe?referer=" + referer
	}

	*/

	certDetailsUrlWithReferer = "https://www.thawte.com/cgi/server/certdetails.exe?referer=" + referer;
	thewindow = window.open(certDetailsUrlWithReferer,
		"newWindow", config="height=511,width=516,toolbar=no,menubar=no," +
		"scrollbars=yes,resizable=no,location=no,directories=no,status=yes");
	thewindow.focus()
}

function openCertDetailsHammy()
{
	
	var referer = "http://www.hammyputter.com";
	/*
	var siteSealImage;

	if (self.sampleReferer) 
		referer = "http://www.hammyputter.com"   //self.sampleReferer;
	else
		referer = "http://www.hammyputter.com"  //window.location; 
	
	
	if (document.images) {
		siteSealImage = document.images["thawteSiteSeal"]
		siteSealImage.src="https://www.thawte.com/cgi/server/seal_generator.exe?referer=" + referer
	}

	*/

	certDetailsUrlWithReferer = "https://www.thawte.com/cgi/server/certdetails.exe?referer=" + referer;
	thewindow = window.open(certDetailsUrlWithReferer,
		"newWindow", config="height=511,width=516,toolbar=no,menubar=no," +
		"scrollbars=yes,resizable=yes,location=yes,directories=no,status=yes");
	thewindow.focus()
}

//-----------------