
var now = new Date();
var arrMonthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");	

function sortAndCleanDuplicatesFromArray (arrOld) {
	arrTemp = arrOld.slice();
	arrTemp.sort();
	var arrNew = new Array;
	var currValue;
	for ( var i=0; i<arrTemp.length; i++) {
		if ( arrTemp[i] != currValue ) {
			arrNew[arrNew.length] = arrTemp[i];
			currValue = arrTemp[i];
		}
	}
	return arrNew;
}

function printVar(str) {
	document.write(str);
}

function getArgs(  ) {
    var args = new Object();
    var pairs = location.search.substring(1).split("&");
    for (var i = 0; i < pairs.length; i++) {
		var pos = pairs[i].indexOf('=');
		if (pos != -1) {
			args[pairs[i].substring(0,pos)] = unescape(pairs[i].substring(pos+1));
	   }
    }
    return args;     // Return the object
}

var args = getArgs();

function printNewsFlash() {
	var str = "";
	str += '<span class="MidBlueSmallBoldText">' + newsflash_title[0] + '</span> <span class="DarkBlueSmallText">' + newsflash_text[0] + '</span>';	
	str += doFlashDetect();
	document.write(str);
}
//
function doFlashDetect() {
	var str = '';
	if (navigator.plugins) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
			var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
			if (flashVersion < 6) {
				str += '<br><br><span style="color:#FF3333"><b>WARNING</b></span><br>';
				str += '<span style="color:#CC0000">You must have <a target="_blank" class="DarkBlueSmallBoldText" href="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">Flash 6</a> (or greater) installed to view this site.</span><br><br>';
			}
		}
	}
	return str;
}
//
function getStyleObject(objectId) {
    // cross-browser function to get an object's style object given its id
    if(document.getElementById && document.getElementById(objectId)) {
		// W3C DOM
		return document.getElementById(objectId).style;
    } else if (document.all && document.all(objectId)) {
		// MSIE 4 DOM
		return document.all(objectId).style;
    } else if (document.layers && document.layers[objectId]) {
		// NN 4 DOM.. note: this won't find nested layers
		return document.layers[objectId];
    } else {
		return false;
    }
} 

function changeObjectVisibility(objectId, newVisibility) {
    // get a reference to the cross-browser style object and make sure the object exists
    var styleObject = getStyleObject(objectId);
    if (styleObject) {
		styleObject.visibility = newVisibility;
		return true;
    }
} 

function changeObjectDisplay(objectId, value) {
    // get a reference to the cross-browser style object and make sure the object exists
    var styleObject = getStyleObject(objectId);
    if (styleObject) {
		styleObject.display = value;
		return true;
    }
} 

function moveObject(objectId, newXCoordinate, newYCoordinate) {
    // get a reference to the cross-browser style object and make sure the object exists
    var styleObject = getStyleObject(objectId);
    if (styleObject) {
		styleObject.left = newXCoordinate;
		styleObject.top = newYCoordinate;
		return true;    
    }
}


function printWhatsNew () {
	var str;
	for ( var i=0; i<news_title.length; i++) {
		str = buildWhatsNewItem( news_from_date[i], news_title[i], news_teaser[i], news_id[i] );
		document.write(str);
	}	
}

function parseFlag(str) {
	return "<img src='images/flags/" + str + ".gif' alt='" + str + "' border='0' align='right'>";
}

function buildWhatsNewItem (date, title, teaser, id) {
	var str = "";
	var flagPos = title.indexOf("*");
	var flagText = "";
	
	if (flagPos != -1) {		
		flagText = parseFlag(title.substring(flagPos+1));		
		title = title.substring(0, flagPos);		
	}
	
	str += "<table cellpadding='0' cellspacing='0' border='0'><tr>";
    str += "		<td width='6' class='MidBlue' rowspan='3'><img src='images/generic/1pixel.gif' width='6' height='1' border='0'></td>";
	str += "		<td class='MidBlue'>" + flagText + "<span class='MidBlue2BoldText'>" + date + "</span></td> ";
    str += "		<td width='6' class='MidBlue' rowspan='3'><img src='images/generic/1pixel.gif' width='6' height='1' border='0'></td>";
	str += "</tr>";
	str += "<tr><td class='MidBlue'>";
	str += "			<span class='LightBlueSmallText'>" + title + "</span> <span class='WhiteSmallText'>" + teaser + "<br>";
	str += "				<a href='news.html?view=" + id + "' class='LightBlueSmallText'>Read more…</a>";
	str += "			</span>";
	str += "		</td> ";
	str += "</tr><tr><td height='10' class='MidBlue'><img src='images/1pixel.gif' width='1' height='1' alt='' border='0'></td></tr></table>";
	// alert(str);
	return str;
}

function printHomeDiary () {
	var str;
	for ( var i=0; i<live_venue.length; i++) {	
		str = "";
		str += "<span class='MidBlueSmallBoldText'>" + live_show_date[i] + "<br>" + live_town[i] + "</span><br>";
		str += "<span class='MidBlueSmallText'>" + live_venue[i] + "</span><br><br>";
		document.write(str);
	}		
}

function printDiaryListing (type) {
	var byPlace, arrByMonth;

	if (args.byplace) {
		byPlace = unescape(args.byplace);
	} else {		
		byPlace = "all";
	}

	if (args.bymonth) {
		arrByMonth = args.bymonth.split(".");
	} else {		
		arrByMonth = new Array(now.getMonth(),now.getFullYear());
	}
	var counter = 0;
	var str;	
	for ( var i=0; i<eval(type +"_venue").length; i++) {		
		//
		var arrDate = eval(type +"_show_date")[i].split(".");
		//
		if ( (arrDate[1]-1) == arrByMonth[0] && arrDate[2] == arrByMonth[1] ) {					
			if (byPlace == "all" || eval(type +"_town")[i] == byPlace) {	
				str = "<span class='LightBlueSmallText'>" + eval(type +"_show_date")[i] + "</span><br>";
				str += "<span class='WhiteSmallBoldText'>" + eval(type +"_town")[i] + ", </span><span class='WhiteSmallText'>" + eval(type +"_venue")[i] + ".</span><br><br>";	
				document.write(str);
				counter ++;
			}
			
		}
	}		
	if (counter == 0) {
		document.write("<span class='LightBlueSmallText'>No entries found.</span>");
	}
}

function printDiaryMonthSelect() {	
	if (args.bymonth) {
		var arrByMonth = args.bymonth.split(".");
	} else {		
		var arrByMonth = new Array(now.getMonth(),now.getFullYear());
	}	
	var str = "<select name='bymonth' class='FormText'>";	
	var currYear = now.getFullYear();
	var currMonth = now.getMonth();	
	for ( var i=0; i<12; i++) {				
		str += "<option value='" + currMonth + "." + currYear + "'";
		if (currMonth == arrByMonth[0] && currYear == arrByMonth[1]) {
			str += " selected";
		}
		str += ">" + arrMonthNames[currMonth] + " " + currYear + "</option>"			
		if (currMonth < 11) {
			currMonth ++;
		} else {
			currMonth = 0;
			currYear ++;
		}
	}			
	str += "</select>";
	document.write (str);	
}
//
function getNextDiaryId() {
	var arr = eval(DIARY_PAGE+"_show_date");	
	for ( var i=0; i<arr.length; i++) {		
		var arrTestDate = arr[i].split(".");
		var testDay = Number(arrTestDate[0]);
		var testMonth = Number(arrTestDate[1]);
		if (testMonth > (now.getMonth()+1)) {
			return i;
		} else if (testMonth == (now.getMonth()+1) && testDay >= now.getDate()) {
			return i;
		}
	}
	return 0;
}


//
function printNextDiary() {

	var id = getNextDiaryId();
	var str = '';
	str += '<span class="LightBlueSmallText"> ' + eval(DIARY_PAGE +"_show_date")[id] + ' </span><br>';
	str += '	<span class="WhiteSmallBoldText"> ' + eval(DIARY_PAGE +"_town")[id] + ' </span>';
	str += '	<span class="WhiteSmallText"> ' + eval(DIARY_PAGE +"_venue")[id] + '.<br><br>';
	str += '	' + eval(DIARY_PAGE +"_info")[id] + '<br>';
	document.write(str);

}
//
function printDiaryPlaceSelect(type) {	
	if (args.byplace) {
		var byPlace = unescape(args.byplace);		
	} else {		
		var byPlace = "all";
	}	
	var str = "<select name='byplace' class='FormText'><option value='all'>All</option>";	
	//
	var arrPlaces = sortAndCleanDuplicatesFromArray(eval(type +"_town"));	
	for ( var i=0; i<arrPlaces.length; i++) {
		str += "<option value='" + escape(arrPlaces[i]) + "'";		
		if (escape(arrPlaces[i]) == escape(byPlace)) {
			str += " selected";
		}
		str += ">" + arrPlaces[i] + "</option>"	
	}
	str += "</select>";
	document.write (str);	
}


function printPagedText(text) {	
	var arrBiog = text.split("<hr>");
	var str = "";
	for ( var h=0; h < arrBiog.length; h++ ) {
		str += "<div style='display:block' id='page_" + h + "'>" + arrBiog[h] + "</div>";	
	}	
	str += "<div align='right'>Page&nbsp;";
	for ( var i=0; i < arrBiog.length; i++ ) {	
		str += "<span style='width:10px;margin:0px 5px:' id='pagenav_" + i + "'><a href='#' class='DarkBlueSmallText' onclick='revealPage(" + i + "); return false;'>" + (i+1) + "</a></span>";
	}
	str += "<a href='#' class='DarkBlueSmallText' onclick='nextPage(); return false;'>&gt;&gt;</a></div>";	
	document.write(str);	
	maxPage = arrBiog.length-1;	
	revealPage(0);
}

function nextPage(id) {	
	currPage ++;
	if (currPage > maxPage) {
		currPage = maxPage;
	}
	revealPage(currPage);
}

function revealPage(id) {		
	for ( var i=0; i<10; i++) {
		var pageNav = getStyleObject("pagenav_"+i);
		if (i == id) {
			changeObjectDisplay("page_" + i, "block");				
			pageNav.fontWeight = "bold";
		} else {
			changeObjectDisplay("page_" + i, "none");
			pageNav.fontWeight = "normal";
		}
	}	
	currPage = id;	
	return false;
}

function printProfile(type) {
	var profileId = getRelevantProfileId(type);
	if ( profileId != "not found") {
		document.write(profile_text[profileId]);
	} else {
		document.write("ERROR: " + type + " not found");
	}
}

function getRelevantProfileId(type) {
	for ( var i=0; i<profile_title.length; i++) {
		var title = profile_title[i].toLowerCase();
		if (title.indexOf(type.toLowerCase()) != -1) {
			return i;
		}
	}
	return "not found";
}

function printPhotoGalleries() {
	var byyear;
	
	if (args.byyear) {
		byyear = args.byyear;
	} else {		
		byyear = now.getFullYear();
	}		
	var counter = 0;	
	var currCol = 1;
	var str = "";	
	for ( var i=0; i<photos_gallery_title.length; i++) {			
		var arrDate = photos_gallery_from_date[i].split(".");		
		if (arrDate[2] == byyear) {		
			var galleryDateLine = arrMonthNames[arrDate[1]-1] + " " + arrDate[2];		
			if (currCol == 1) {
				str += '<tr valign="top">';			
			}		
			str += '<td><a class="galleryThumb" href="photos_album.html?id=' + photos_gallery_id[i] + '"><img src="' + photos_gallery_image[i] + '" vspace="4" height="52" alt="' + photos_gallery_title[i] + '"></a><br><a href="photos_album.html?id=' + photos_gallery_id[i] + '" class="LightBlueSmallText">' + photos_gallery_title[i] + '</a><!--<br><span class="MidBlueSmallBoldText">' + galleryDateLine + '</span>--><br><br></td>';
			if (currCol < 3) {
				currCol ++;
			} else {
				str += '</tr>';			
				currCol = 1;
			}		
			counter ++;	
		}		
	}
	if (counter == 0) {
		str += '<tr valign="top">';			
		str += '<td colspan="3"><span class="MidBlueSmallBoldText">No albums found for that year.</span></td>';
		str += '</tr>';			
	}	
	document.write(str);
}

function printGalleryYearSelect() {	
	if (args.byyear) {
		var byyear = args.byyear;
	} else {		
		var byyear = now.getFullYear();
	}	
	var str = "<select name='byyear' class='FormText'>";	
	var currYear = now.getFullYear();
	for ( var year=2001; year<=currYear; year++) {				
		str += "<option value='" + year + "'";
		if (year == byyear) {
			str += " selected";
		}
		str += ">" + year + "</option>"			
	}			
	str += "</select>";
	document.write (str);	
}

function printPhotoYearTitle() {
	if (args.byyear) {
		var byyear = args.byyear;
	} else {		
		var byyear = now.getFullYear();
	}	
	document.write ('<img src="images/band_gallery_date_' + byyear + '.gif" width="104" height="30" alt="' + byyear + '" border="0">');
}

function printPhotoAlbumYearTitle() {

	var id = getCurrentAlbumId();
	var arrDate = photos_gallery_from_date[0].split(".");
	document.write ('<img src="images/band_gallery_date_' + arrDate[2] + '.gif" width="104" height="30" alt="' + arrDate[2] + '" border="0">');
}

function getCurrentAlbumId() {
	if (args.id) {
		for ( var i=0; i<photos_gallery_id.length; i++) {	
			if (photos_gallery_id[i] == args.id) {
				return i;
			}
		}		
	}
}

function printPhotoAlbumDetails() {
	
	var id = getCurrentAlbumId();
	
	var str = '<span class="WhiteSmallBoldText">' + photos_gallery_title[id] + '</span><br><br>';
	str += '<span class="WhiteSmallText">Click on thumbnail to view larger image.</span>';
	
	document.write(str);

}

function printPhotoAlbum() {
	var currCol = 1;
	var str = "";	
	for ( var i=0; i<photos_image_title.length; i++) {			
	
		if (currCol == 1) {
			str += '<tr valign="top">';			
		}		
		var flipUrl = 'flipbook.html?id=' + args.id + '&imageid=' + i;
		
		str += '<td align="center"><a class="galleryThumb" href="' + flipUrl + '" target="_blank" onclick="window.open(\'' + flipUrl + '\',\'pop\',\'toolbar=no,menubar=no,scrollbars=no,resizable=true,width=500,height=500,top=40,left=40\'); return false;"><img src="' + photos_image_image1[i] + '" vspace="6" width="74" height="52" alt="' + photos_image_title[i] + '"></a></td>';

		if (currCol < 4) {
			currCol ++;
		} else {
			str += '</tr>';			
			currCol = 1;
		}			
	}
	document.write(str);
}

function getLatestNews () {	
	
	if (news_thumbnail[0] != "") {
		var newsImage = news_thumbnail[0];
	}

	var flagPos = news_title[0].indexOf("*");
	var flagText = "&nbsp;";
	
	var title = news_title[0];
	
	if (flagPos != -1) {		
		flagText = parseFlag(title.substring(flagPos+1));		
		title = title.substring(0, flagPos);		
	}

	var str = '<tr valign="top"><td>' + flagText + '<span class="WhiteSmallBoldText">' + news_from_date[0] + '<br>' + title + '</span><br><span class="WhiteSmallText">' + news_text[0] + '</span></td>';
	
	if (news_thumbnail[0] != "") {
		str += '<td><img src="images/1pixel.gif" width="6" height="13" alt="" border="0"></td>';
		str += '<td><img src="' + newsImage + '" alt="" border="0"></td>';
	}
	
	str += '</tr>';
	return str;
}

function printNewsListing() {
	var str = "";		
	for ( var i=0; i<news_title.length; i++) {			
		if (news_title[i]) {
			var flagText = "<img src='images/1pixel.gif' width='38' alt='' height='1' border='0' vspace='0' ><br>";
			var title = news_title[i];
			var flagPos = title.indexOf("*");			
			if (flagPos != -1) {		
				var countryName = title.substring(flagPos+1);
				flagText += "<img vspace='4' src='images/flags/" + countryName + ".gif' alt='" + countryName + "' border='0' hspace='4'>";
				title = title.substring(0, flagPos);		
			} 
	 		str += '<table width="410" cellpadding="0" cellspacing="0" border="0"><tr valign="top">';
			str += '<td class="MidBlue" width="34" align="right">' + flagText + '</td>';
    		str += '<td width="376" class="MidBlue">'
			if (news_thumbnail[i] != "") {
	    		str += '     <img src="' + news_thumbnail[i] + '" alt="" border="0" align="right">';
			}
			str += '<span class="LightBlueSmallText">' + news_from_date[i] + '</span><br><span class="LightBlueSmallText">' + title + '</span><br><span class="WhiteSmallText">' + news_text[i] + '</span></td>';			
			str += '</tr></table><br><br>';		
		}		
	}	
	
	if (news_title.length == 0) {
		str += "&nbsp;&nbsp;&nbsp;No stories found for that month.";
	}
	
	document.write (str);
}


function printNewsArchiveSelect() {		
	if (args.bymonth) {
		var bymonth = args.bymonth;
	} else {		
		if (now.getMonth < 10) {
			var bymonth = String(now.getFullYear()) + "0" + (now.getMonth()+1);
		} else {
			var bymonth = String(now.getFullYear()) + "" + (now.getMonth()+1);
		}
	}		
	var str = "<select name='bymonth' class='FormText'>";	
	var currYear = now.getFullYear();	
	var currMonth = now.getMonth();	
	var byMonthValue;

	for ( var year=currYear; year>=2001; year--) {	
		for (var month=12; month>=1; month--) {										
			if (month < 10) {		
				byMonthValue = year + "0" + month;				
			} else {			
				byMonthValue = year + "" + month;			
			}				
			if ((year == currYear) && month > (currMonth+1)) {
				// skip
			} else {
				str += "<option value='" + byMonthValue +  "'";		
				if (byMonthValue == bymonth) {
					str += " selected";
				}
				str += ">" + arrMonthNames[month-1] + " " + year + "</option>";	
			}
		}
	}	
	
	str += "</select>";
	document.write (str);	
}

function extractLatestNews() {
	strLatestNews = getLatestNews();	
}

function printLatestNews() {
	document.write(strLatestNews);	
}

function printInterviewSelect(id) {	
	var str = "<select name='id' class='FormText'>";	
	for ( var i=0; i<interview_id.length; i++) {				
		str += "<option value='" + interview_id[i] + "'";
		if (interview_id[i] == id) {
			str += " selected";
		}
		str += ">" + interview_title[i] + "</option>"			
	}			
	str += "</select>";
	document.write (str);	
}

function printDownloads() {	
	
	var arrCopy = new Array;
	var arrFiles = new Array;
	var arrThumbs = new Array;
	var debugText = "";	
	for ( var i=0; i<downloads_title.length; i++) {	
		var arrType = downloads_title[i].split(" ");
		var id = Number(arrType[0]);
		if (arrType[1] == "filename") {
			arrFiles[id] = downloads_text[i];
		} else if (arrType[1] == "copy") {
			arrCopy[id] = downloads_text[i];			
			debugText += id + ". " + arrType[1] + " : " + downloads_text[i] + "\n";					
		} else if (arrType[1] == "thumb") {
			arrThumbs[id] = downloads_text[i];
		}		
	}	
	// alert(debugText);
	var str = "";		
	for ( var i=0; i<arrFiles.length; i++ ) {	
		if (arrFiles[i]) {
			str += "<tr valign='top'>"
			str += "	<td class='MidBlue'><a href='downloads/" + arrFiles[i] + "' target='_blank'><img src='downloads/" + arrThumbs[i] + "' border='0'></a></td><td class='WhiteSmallText'>" + arrCopy[i] + "</td>";
			str += "</tr>"		
		}	
	}			
	document.write (str);	
}
//
function printDvdMenu() {
	var str = '<table width="100%" border="0" cellspacing="8" cellpadding="0">';	
	
	if (dvd_id) {
		for (var i=0; i<dvd_id.length; i++) {	
			str += '<tr valign="top">';
			str += '	<td><a href="dvd_view.php?id=' + dvd_id[i] + '"><img border="0" src="' + dvd_image1[i] + '" alt="' + dvd_title[i] + '"><br>Watch clips...</a><br><br></td>';
			str += '	<td width="90%"><a href="dvd_view.php?id=' + dvd_id[i] + '" class="WhiteSmallBoldText">' + dvd_title[i] + '</a><br>' + dvd_text[i] + '</td>';
			str += '</tr>';
		}
	} else {
		str += '<tr valign="top">';
		str += '	<td class="WhiteSmallBoldText">ERROR. Please try again later.</td>';
		str += '</tr>';
	}
	
	str += '</table>';	
	document.write(str);
}

function printDvdListing() {

	var currCol = 1;
	var str = '<table cellspacing="0" cellpadding="0" border="0" width="400">';
	
	for (var i=0; i<dvd_track_id.length; i++) {	
	
		if (currCol == 1) {
			str += '<tr>';
		}
	
		str += '<td width="74" valign="bottom">';
		str += '	<span class="LightBlueSmallText">' + dvd_track_title[i] + '</span><br>';
		str += '	<img vspace="4" src="' + dvd_track_image1[i] + '" border="0" alt=""><br>';		
		str += '	<a href="pop_dvd_menu.html?id=' + args.id + '&type=wmp&track=' + i + '" onclick="window.open(this.href,\'video\',\'toolbar=no,menubar=no,status=yes,scrollbars=no,width=500,height=220,top=20,left=20\');return false;"><img src="images/dvd_windows.gif" width="74" height="12" alt="Windows Media Player" border="0" vspace="4"></a><br>';
		str += '	<a href="pop_dvd_menu.html?id=' + args.id + '&type=real&track=' + i + '" onclick="window.open(this.href,\'video\',\'toolbar=no,menubar=no,status=yes,scrollbars=no,width=500,height=220,top=220,left=20\');return false;"><img src="images/dvd_real.gif" width="74" height="12" alt="Real Player" border="0" vspace="4"></a><br>';
			
		str += '	<br></td>';
	
		if (currCol == 4) {
			str += '</tr>';
			currCol = 1;
		} else {
			str += '<td width="30" class="MidBlue"><img src="images/1pixel.gif" width="30" height="1" alt="" border="0"></td>';
			currCol ++;
		}
	}
	
	str += '</table>';
	document.write(str);
	
}


function printVideoListing() {

	var currCol = 1;
	var str = '<table cellspacing="0" cellpadding="0" border="0" width="400">';
	
	for (var i=0; i<video_id.length; i++) {	
	
		if (video_category[i] == category) {
		
			if (currCol == 1) {
				str += '<tr>';
			}
		
			str += '<td width="74" valign="bottom">';
			str += '	<span class="LightBlueSmallText">' + video_title[i] + '</span><br>';
			str += '	<img vspace="4" src="' + video_image1[i] + '" border="0" alt=""><br>';		
			str += '	<a href="pop_video_menu.html?type=wmp&track=' + i + '" onclick="window.open(this.href,\'video\',\'toolbar=no,menubar=no,status=yes,scrollbars=no,width=500,height=220,top=20,left=20\');return false;"><img src="images/dvd_windows.gif" width="74" height="12" alt="Windows Media Player" border="0" vspace="4"></a><br>';
			str += '	<a href="pop_video_menu.html?type=real&track=' + i + '" onclick="window.open(this.href,\'video\',\'toolbar=no,menubar=no,status=yes,scrollbars=no,width=500,height=220,top=220,left=20\');return false;"><img src="images/dvd_real.gif" width="74" height="12" alt="Real Player" border="0" vspace="4"></a><br>';
				
			str += '	<br></td>';
		
			if (currCol == 4) {
				str += '</tr>';
				currCol = 1;
			} else {
				str += '<td width="30" class="MidBlue"><img src="images/1pixel.gif" width="30" height="1" alt="" border="0"></td>';
				currCol ++;
			}
		
		}
	}
	
	str += '</table>';
	document.write(str);
	
}

function printVideoCategorySelect() {
	var str = "<select name='category' class='FormText'>";	
	//
	var arrCategories = sortAndCleanDuplicatesFromArray(video_category);	
	for ( var i=0; i<arrCategories.length; i++) {
		str += "<option value='" + escape(arrCategories[i]) + "'";		
		if (arrCategories[i] == category) {
			str += " selected";
		}
		str += ">" + arrCategories[i] + "</option>"	
	}
	str += "</select>";
	document.write (str);
}