<!--

COUNTRIES = new Array();
LASTENTRY = new Array();

COUNTRIES["AF"] = new Array("Afghanistan");
COUNTRIES["AL"] = new Array("Albania");
COUNTRIES["DZ"] = new Array("Algeria");
COUNTRIES["AD"] = new Array("Andorra");
COUNTRIES["AO"] = new Array("Angola");
COUNTRIES["AR"] = new Array("Argentina","Ciudad Autónoma de Buenos Aires", "Buenos Aires", "Catamarca", "Chaco", "Chubut", "Córdoba", "Corrientes", "Entre Ríos", "Formosa", "Jujuy", "La Pampa", "La Rioja", "Mendoza", "Misiones", "Neuquén", "Rio Negro", "Salta", "San Juan", "San Luis", "Santa Cruz", "Santa Fe", "Santiago del Estero", "Tierra del Fuego", "Tucumán");
COUNTRIES["AM"] = new Array("Armenia");
COUNTRIES["AU"] = new Array("Australia","Victoria", "New South Wales", "Queensland", "South Australia", "Western Australia", "Tasmania", "Northern Territory", "Australian Capital Territory");
COUNTRIES["AT"] = new Array("Austria", "Burgenland", "Kärnten", "Niederösterreich", "Oberösterreich", "Salzburg", "Steiermark", "Tirol", "Vorarlberg", "Wien");
COUNTRIES["BS"] = new Array("Bahamas");
COUNTRIES["BH"] = new Array("Bahrain");
COUNTRIES["BB"] = new Array("Barbados");
COUNTRIES["BY"] = new Array("Belarus");
COUNTRIES["BE"] = new Array("Belgium", "Antwerpen", "Limburg", "Oost-Vlaanderen", "West-Vlaanderen", "Vlaams-Brabant", "Brabant Wallon", "Namur", "Liège", "Hainaut", "Luxembourg", "Bruxelles-Capitale");
COUNTRIES["BM"] = new Array("Bermuda");
COUNTRIES["BO"] = new Array("Bolivia");
COUNTRIES["BA"] = new Array("Bosnia and Herzegovina");
COUNTRIES["BR"] = new Array("Brazil", "Acre", "Alagoas", "Amapá", "Amazonas", "Bahia", "Ceará", "Espírito Santo", "Goiás", "Maranhão", "Mato Grosso", "Mato Grosso do Sul", "Minas Gerais", "Pará", "Paraíba", "Paraná", "Pernambuco", "Piauí", "Rio de Janeiro", "Rio Grande do Norte", "Rio Grande do Sul", "Rondônia", "Roraima", "Santa Catarina", "São Paulo", "Sergipe", "Tocantins", "Distrito Federal");
COUNTRIES["BG"] = new Array("Bulgaria");
COUNTRIES["CA"] = new Array("Canada", "Alberta", "British Columbia", "Manitoba", "New Brunswick", "Newfoundland and Labrador", "Northwest Territories", "Nova Scotia", "Nunavut", "Ontario", "Prince Edward Island", "Quebec", "Saskatchewan", "Yukon");
COUNTRIES["KH"] = new Array("Cambodia");
COUNTRIES["CV"] = new Array("Cape Verde");
COUNTRIES["CL"] = new Array("Chile");
COUNTRIES["CN"] = new Array("China");
COUNTRIES["CO"] = new Array("Colombia");
COUNTRIES["CR"] = new Array("Costa Rica");
COUNTRIES["HR"] = new Array("Croatia");
COUNTRIES["CU"] = new Array("Cuba");
COUNTRIES["CY"] = new Array("Cyprus");
COUNTRIES["CZ"] = new Array("Czech Republic");
COUNTRIES["DK"] = new Array("Denmark", "Hovedstaden", "Midtjylland", "Nordjylland", "Sjælland", "Syddanmark");
COUNTRIES["DO"] = new Array("Dominican Republic");
COUNTRIES["EC"] = new Array("Ecuador");
COUNTRIES["EG"] = new Array("Egypt");
COUNTRIES["ER"] = new Array("Eritrea");
COUNTRIES["EE"] = new Array("Estonia");
COUNTRIES["FI"] = new Array("Finland", "Lapland", "Northern Ostrobothnia", "Kainuu", "North Karelia", "Northern Savonia", "Southern Savonia", "Southern Ostrobothnia", "Ostrobothnia", "Pirkanmaa", "Satakunta", "Central Ostrobothnia", "Central Finland", "Finland Proper", "South Karelia", "Päijänne Tavastia", "Tavastia Proper", "Uusimaa", "Eastern Uusimaa", "Kymenlaakso", "Åland Islands");
COUNTRIES["FR"] = new Array("France","01 Ain", "02 Aisne", "03 Allier", "04 Alpes-de-Haute-Provence", "05 Hautes-Alpes", "06 Alpes-Maritimes", "07 Ardèche", "08 Ardennes", "09 Ariège", "10 Aube", "11 Aude", "12 Aveyron", "13 Bouches-du-Rhône", "14 Calvados", "15 Cantal", "16 Charente", "17 Charente-Maritime", "18 Cher", "19 Corrèze", "2A Corse-du-Sud", "2B Haute-Corse", "21 Côte-d'Or", "22 Côtes-d'Armor", "23 Creuse", "24 Dordogne", "25 Doubs", "26 Drôme", "27 Eure", "28 Eure-et-Loir", "29 Finistère", "30 Gard", "31 Haute-Garonne", "32 Gers", "33 Gironde", "34 Hérault", "35 Ille-et-Vilaine", "36 Indre", "Indre-et-Loire", "38 Isère", "39 Jura", "40 Landes", "41 Loir-et-Cher", "42 Loire", "43 Haute-Loire", "44 Loire-Atlantique", "45 Loiret", "46 Lot", "47 Lot-et-Garonne", "48 Lozère", "49 Maine-et-Loire", "50 Manche", "51 Marne", "52 Haute-Marne", "53 Mayenne", "54 Meurthe-et-Moselle", "55 Meuse", "56 Morbihan", "57 Moselle", "58 Nièvre", "59 Nord", "60 Oise", "61 Orne", "62 Pas-de-Calais", "63 Puy-de-Dôme", "64 Pyrénées-Atlantiques", "65 Hautes-Pyrénées", "66 Pyrénées-Orientales", "67 Bas-Rhin", "68 Haut-Rhin", "69 Rhône", "70 Haute-Saône", "71 Saône-et-Loire", "72 Sarthe", "73 Savoie", "74 Haute-Savoie", "75 Paris", "76 Seine-Maritime", "77 Seine-et-Marne", "78 Yvelines", "79 Deux-Sèvres", "80 Somme", "81 Tarn", "82 Tarn-et-Garonne", "83 Var", "84 Vaucluse", "85 Vendée", "86 Vienne", "87 Haute-Vienne", "88 Vosges", "89 Yonne", "90 Territoire de Belfort", "91 Essonne", "92 Hauts-de-Seine", "93 Seine-Saint-Denis", "94 Val-de-Marne", "95 Val-d'Oise");
COUNTRIES["GE"] = new Array("Georgia");
COUNTRIES["GH"] = new Array("Ghana");
COUNTRIES["DE"] = new Array("Germany", "Hamburg", "Hessen", "Baden-Württemberg", "Niedersachsen", "Bayern", "Berlin", "Brandenburg", "Bremen", "Mecklenburg-Vorpommern", "Nordrhein-Westfalen", "Rheinland-Pfalz", "Saarland", "Sachsen", "Sachsen-Anhalt", "Schleswig-Holstein", "Thüringen");
COUNTRIES["GR"] = new Array("Greece", "Thrace", "Macedonia", "Thessaly", "Epirus", "Central Greece", "Attica", "Peloponnese", "Aegean Islands", "Ionian Islands", "Crete");
COUNTRIES["GP"] = new Array("Guadeloupe");
COUNTRIES["GT"] = new Array("Guatemala");
COUNTRIES["HT"] = new Array("Haiti");
COUNTRIES["HN"] = new Array("Honduras");
COUNTRIES["HK"] = new Array("Hong Kong");
COUNTRIES["HU"] = new Array("Hungary");
COUNTRIES["KZ"] = new Array("Kazakhstan");
COUNTRIES["KE"] = new Array("Kenya");
COUNTRIES["KP"] = new Array("Korea, Democratic People's Republic of");
COUNTRIES["KR"] = new Array("Korea, Republic of");
COUNTRIES["KW"] = new Array("Kuwait");
COUNTRIES["IS"] = new Array("Iceland");
COUNTRIES["IN"] = new Array("India");
COUNTRIES["ID"] = new Array("Indonesia");
COUNTRIES["IQ"] = new Array("Iraq");
COUNTRIES["IR"] = new Array("Islamic Republic of Iran");
COUNTRIES["IE"] = new Array("Ireland", "Border", "West", "Midland", "Mid-East", "Dublin Region", "South-East", "South-West", "Mid-West");
COUNTRIES["IL"] = new Array("Israel");
COUNTRIES["IT"] = new Array("Italy", "Lombardia", "Campania", "Lazio", "Sicilia", "Veneto", "Piemonte", "Emilia-Romagna", "Puglia", "Toscana", "Calabria", "Sardegna", "Liguria", "Marche", "Abruzzo", "Friuli-Venezia Giulia", "Trentino-Alto Adige", "Umbria", "Basilicata", "Molise", "Valle d'Aosta");
COUNTRIES["CI"] = new Array("Ivory Coast");
COUNTRIES["JM"] = new Array("Jamaica");
COUNTRIES["JP"] = new Array("Japan");
COUNTRIES["JO"] = new Array("Jordan");
COUNTRIES["LA"] = new Array("Lao People's Democratic Republic");
COUNTRIES["LV"] = new Array("Latvia");
COUNTRIES["LB"] = new Array("Lebanon");
COUNTRIES["LY"] = new Array("Libyan Arab Jamahiriya");
COUNTRIES["LI"] = new Array("Liechtenstein");
COUNTRIES["LT"] = new Array("Lithuania");
COUNTRIES["LU"] = new Array("Luxembourg");
COUNTRIES["MO"] = new Array("Macau");
COUNTRIES["MG"] = new Array("Madagascar");
COUNTRIES["MY"] = new Array("Malaysia");
COUNTRIES["MT"] = new Array("Malta");
COUNTRIES["MQ"] = new Array("Martinique");
COUNTRIES["MN"] = new Array("Mauritania");
COUNTRIES["MX"] = new Array("Mexico", "Aguascalientes", "Baja California", "Baja California Sur", "Campeche", "Chiapas", "Chihuahua", "Coahuila de Zaragoza", "Colima", "Durango", "Guanajuato", "Guerrero", "Hidalgo", "Jalisco", "México", "Michoacán de Ocampo", "Morelos", "Nayarit", "Nuevo León", "Oaxaca", "Puebla", "Querétaro Arteaga", "Quintana Roo", "San Luis Potosí", "Sinaloa", "Sonora", "Tabasco", "Tamaulipas", "Tlaxcala", "Veracruz", "Yucatán", "Zacatecas");
COUNTRIES["MD"] = new Array("Moldova");
COUNTRIES["MC"] = new Array("Monaco");
COUNTRIES["ME"] = new Array("Montenegro");
COUNTRIES["MA"] = new Array("Morocco");
COUNTRIES["NL"] = new Array("Netherlands", "Friesland", "Groningen", "Drenthe", "Zeeland", "North Brabant", "Limburg", "North Holland", "South Holland", "Utrecht", "Gelderland", "Overijssel", "Flevoland");
COUNTRIES["NC"] = new Array("New Caledonia");
COUNTRIES["NZ"] = new Array("New Zealand");
COUNTRIES["NG"] = new Array("Nigeria");
COUNTRIES["NI"] = new Array("Nicaragua");
COUNTRIES["NF"] = new Array("Norfolk Island");
COUNTRIES["NO"] = new Array("Norway", "Finnmark", "Troms", "Nordland", "Nord-Trøndelag", "Sør-Trøndelag", "Møre og Romsdal", "Sogn og Fjordane", "Hordaland", "Rogaland", "Vest-Agder", "Aust-Agder", "Telemark", "Buskerud", "Hedmark", "Oppland", "Akershus", "Oslo", "Vestfold", "Østfold");
COUNTRIES["PA"] = new Array("Panama");
COUNTRIES["PK"] = new Array("Pakistan");
COUNTRIES["PE"] = new Array("Peru");
COUNTRIES["PH"] = new Array("Philippines");
COUNTRIES["PL"] = new Array("Poland");
COUNTRIES["PT"] = new Array("Portugal", "Lisboa", "Leiria", "Santarém", "Setúbal", "Beja", "Faro", "Évora", "Portalegre", "Castelo Branco", "Guarda", "Coimbra", "Aveiro", "Viseu", "Bragança", "Vila Real", "Porto", "Braga", "Viana do Castelo");
COUNTRIES["PR"] = new Array("Puerto Rico");
COUNTRIES["RO"] = new Array("Romania");
COUNTRIES["RU"] = new Array("Russian Federation");
COUNTRIES["RW"] = new Array("Rwanda");
COUNTRIES["SM"] = new Array("San Marino");
COUNTRIES["SA"] = new Array("Saudi Arabia");
COUNTRIES["SN"] = new Array("Senegal");
COUNTRIES["RS"] = new Array("Serbia");
COUNTRIES["SG"] = new Array("Singapore");
COUNTRIES["SK"] = new Array("Slovakia");
COUNTRIES["SI"] = new Array("Slovenia");
COUNTRIES["SO"] = new Array("Somalia");
COUNTRIES["ZA"] = new Array("South Africa");
COUNTRIES["ES"] = new Array("Spain", "Álava/Araba", "Albacete", "Alicante/Alacant", "Almería", "Asturias/Asturies", "Ávila", "Badajoz", "Barcelona", "Burgos", "Cáceres", "Cádiz", "Cantabria", "Castellón/Castelló", "Ciudad Real", "Córdoba", "A Coruña", "Cuenca", "Girona", "Granada", "Guadalajara", "Guipúzcoa/Gipuzkoa", "Huelva", "Huesca", "Illes Balears", "Jaén", "La Rioja", "León", "Lleida", "Lugo", "Madrid", "Málaga", "Murcia", "Navarra/Nafarroa", "Ourense", "Palencia", "Las Palmas", "Pontevedra", "Salamanca", "Tenerife", "Segovia", "Sevilla", "Soria", "Tarragona", "Teruel", "Toledo", "Valencia/València", "Valladolid", "Vizcaya/Bizkaia", "Zamora", "Zaragoza");
COUNTRIES["LK"] = new Array("Sri Lanka");
COUNTRIES["SD"] = new Array("Sudan");
COUNTRIES["SE"] = new Array("Sweden", "Stockholm", "Västerbotten", "Norrbotten", "Uppsala", "Södermanland", "Östergötland", "Jönköping", "Kronoberg", "Kalmar", "Gotland", "Blekinge", "Skåne", "Halland", "Västra Götaland", "Värmland", "Örebro", "Västmanland", "Dalarna", "Gävleborg", "Västernorrland", "Jämtland");
COUNTRIES["CH"] = new Array("Switzerland", "Aargau", "Appenzell Innerrhoden", "Appenzell Ausserrhoden", "Basel-Stadt", "Basel-Landschaft", "Bern", "Fribourg", "Geneva", "Glarus", "Graubünden", "Jura", "Lucerne", "Neuchâtel", "Nidwalden", "Obwalden", "Schaffhausen", "Schwyz", "Solothurn", "St. Gallen", "Thurgau", "Ticino", "Uri", "Valais", "Vaud", "Zug", "Zürich");
COUNTRIES["SY"] = new Array("Syrian Arab Republic");
COUNTRIES["TH"] = new Array("Thailand");
COUNTRIES["TL"] = new Array("Timor-Leste");
COUNTRIES["TG"] = new Array("Togo");
COUNTRIES["TK"] = new Array("Tokelau");
COUNTRIES["TO"] = new Array("Tonga");
COUNTRIES["TT"] = new Array("Trinidad And Tobago");
COUNTRIES["TN"] = new Array("Tunisia");
COUNTRIES["TR"] = new Array("Turkey");
COUNTRIES["TM"] = new Array("Turkmenistan");
COUNTRIES["TV"] = new Array("Tuvalu");
COUNTRIES["UG"] = new Array("Uganda");
COUNTRIES["UA"] = new Array("Ukraine");
COUNTRIES["AE"] = new Array("United Arab Emirates");
COUNTRIES["UK"] = new Array("United Kingdom","East & East Anglia","East Midlands","London & Thames","North East","North West","South & South East","South West","West Midlands","Yorkshire","Wales","Scotland","Northern Ireland");
COUNTRIES["US"] = new Array("United States","Alabama","Alaska","Arizona","Arkansas","Armed Forces Asia","Armed Forces Europe","Armed Forces Pacific","California","Colorado","Connecticut","Delaware","District of Columbia","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming");
COUNTRIES["UY"] = new Array("Uruguay");
COUNTRIES["VE"] = new Array("Venezuela");
COUNTRIES["VN"] = new Array("Viet Nam");



function populate(select_trig, select_pop, select_trig_value, select_pop_value) {
	var trigi=1;
	
	if (select_trig.options.length < 2) {
		for (var key in COUNTRIES ) {
			select_trig.options[trigi] = new Option(COUNTRIES[key][0],key);

                	trigi++;
		}
	}

	if (select_trig_value) {
		formSetValue(select_trig,select_trig_value);
	}	

	if (select_trig.selectedIndex == 0 || COUNTRIES[select_trig.options[select_trig.selectedIndex].value].length == 1) {
		var i=1;
		if (select_pop) {
		    select_pop.disabled=true;  
		    clearSelect(select_pop);    
		    select_pop.options[1] = new Option("Not Applicable","");
			select_pop.selectedIndex=1;
		}
	}
	
	if (select_trig.selectedIndex > 0 && COUNTRIES[select_trig.options[select_trig.selectedIndex].value].length > 1) {

		if (select_pop) {
	        select_pop.disabled=false;
        	clearSelect(select_pop);
			for (i=1; i < COUNTRIES[select_trig.options[select_trig.selectedIndex].value].length; i++) {
				//select_pop.options[i] = new Option(COUNTRIES[select_trig.options[select_trig.selectedIndex].value][i],i);
				var popvalue = COUNTRIES[select_trig.options[select_trig.selectedIndex].value][i];
				select_pop.options[i] = new Option(popvalue,popvalue);
			}
		}
	}

	if (select_pop_value) {
		formSetValue(select_pop,select_pop_value);
	}	

	


}
function clearSelect(select_box){
	for(i = select_box.options.length -1; i > 0; i--){
		select_box.options[i] = null;
	}
}

function count(max) {
	var msgString = document.signup1.aboutyou.value;
	var msgLength= msgString.length;
	if (msgLength > max) {
		document.signup1.aboutyou.value = document.signup1.aboutyou.value.substr(0,max);
		msgLength=max;
		alert("Sorry, you have reached the limit.\n");
	}
	document.signup1.countup.value = msgLength;
	document.signup1.countdown.value = max-msgLength;
}

function goat(select_box,select_value) {
	for (i=0; i < select_box.length; i++) {
		if (select_box.options[i].value==select_value) { select_box.selectedIndex=i }
	}
	
}

function formSetValue(fieldElement,fieldValue) {
	
	if (fieldElement.type=="select-one") {
		for (i=0; i < fieldElement.length; i++) {
			if (fieldElement.options[i].value==fieldValue) { fieldElement.selectedIndex=i }
		}
		fieldElement.disabled=false;

	}
		
	if (fieldElement.type=="text") {
		fieldElement.value = fieldValue;
	}
	if (fieldElement.type=="checkbox") {
		fieldElement.checked = fieldValue;
	}
		
}

function check() 
{
	if(document.signup1.p_contact[3].checked==true && document.signup1.p2_contact[3].checked==true)
	{
		alert('You Cannot Select Nobody for both Dating and Friends');
		return false;
	}
}


function writediv(texte)
     {
     document.getElementById('pseudobox').innerHTML = texte;
     }

function verifPseudo(nickname)
     {
     if(nickname != '')
               {
               if(nickname.length<5)
                         writediv('<span style="color:#CC0066"><b>'+nickname+' :</b> this nickname is too short</span>');
               else if(nickname.length>18)
                         writediv('<span style="color:#CC0066"><b>'+nickname+' :</b> this nickname is too long</span>');
               else if(texte = file('verifnick.asp?id='+escape(nickname)))
                         {
          if(texte == 1)
               writediv('<span style="color:#CC0066"><b>'+nickname+' :</b> this nickname is already taken :(</span>');
          else if(texte == 2)
               writediv('<span style="color:#1A7917"><b>'+nickname+' :</b> this nickname is Available !</span>');
          else if(texte == 3)
               writediv('<span style="color:#CC0066"><b>'+nickname+' :</b> Error, not allowed characters !</span>');
          else
               writediv('');
                         }
               }

     }
 
 function file(fichier)
     {
     if(window.XMLHttpRequest) // FIREFOX
          xhr_object = new XMLHttpRequest(); 
     else if(window.ActiveXObject) // IE
          xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); 
     else 
          return(false); 
     xhr_object.open("GET", fichier, false); 
     xhr_object.send(null); 
     if(xhr_object.readyState == 4) return(xhr_object.responseText);
     else return(false);
     }

function MM_openBrWindow(theURL,winName,features,width,height) { //v2.0
window.open(theURL,winName,features);
}

function openpop(page,w,h)
{
var winleft = (screen.width - 750) / 2;
var winUp = (screen.height - 520) / 2;
window.open('http://www.flirtcamz.com/'+page,'popwin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,menubar=no,width='+w+',height='+h+',left='+winleft+',top='+winUp);
}

function lostpass()
{
	window.open('forgot.asp','login','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,menubar=no,width=390,height=350'); 
}
function ConfirmDelete()
{
    if (confirm("Are you sure that you want to permanently delete this post?"))
    {
        return true;
    }
    return false; 
}


function checkupload()
{
	if(document.upload_main.imagefile.value == "")
	{
		alert('You must choose a file to upload');
		return false;
	}
	
	uploadFile = document.upload_main.imagefile.value;

	var len = uploadFile.length;
	var ext = uploadFile.substring((len-4),len);
	ext = ext.toLowerCase();
	ok = 0;
	
	if (ext=='.jpg' || ext=='.png' || ext=='jpeg' || ext=='.bmp' || ext=='.gif') { ok = 1; }
		
	if(ok!=1) {
		alert('Sorry the file you are trying to upload is not a supported image.\nFlirtCamz only supports: JPG, GIF, BMP, & PNG Only');
		return false;
	}
	
	document.getElementById('uploading').style.display="none"; 
	document.getElementById('uploading2').style.display=""; 
	
	document.getElementById('uploading2').innerHTML = '<img src="images/upload_file.gif" id="tester"><br><br><b><font color="#FF0000">Image Uploading..</font>  Please be patient, do not navigate away from this page.</b>';
}

function nomemberselected()
{
alert('Please visit a Member\'s Page to start a 1-to-1 Video Communication');
}

/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}

function writeImgTag(code)
{
var cache = document.signup1.aboutyou.value;
this.code = code;
//document.signup1.aboutyou.value = cache + " <img src='/images/smiles/" + code + ".gif'> ";
document.signup1.aboutyou.value = cache + code;
document.signup1.aboutyou.focus();
}

function formatStr(EL,maxchars)

{
   strbuff=EL.innerHTML;

   newstr='';
   startI = 0;
   max=maxchars;
   str='';
   subarr=new Array(parseInt(strbuff.length/max+1));
   for (i=0;i<subarr.length;i++)
   {

      subarr[i]=strbuff.substr(startI,max);
      startI+=max;
   }
   for (i=0;i<subarr.length-1;i++)
   {
      newstr+=subarr[i]+'<br />';
   }
   str+=subarr[subarr.length-1];
   EL.innerHTML=newstr;

}
//-->
