/* --- Általános scriptek --- */
function textCounter( field, countfield, maxlimit ) {
 if ( field.value.length > maxlimit ) {
  field.value = field.value.substring( 0, maxlimit );
  field.blur();
  field.focus();
  return false;
 } else {
  countfield.value = maxlimit - field.value.length;
 }
}
function pic_add()
{
    kepek_szama=document.getElementById('kepszam')[document.getElementById('kepszam').selectedIndex].value;
    if (kepek_szama != 0)
    {
         osszes="";
         kiir = "Kép [max. 2 Mb]:<input class=alap type=file name=fotofiles[] id=fotofiles[] title=Elérési út><br /><br />";
         for(i = 1; i <= kepek_szama; i++)
         {
            osszes += kiir
         }
            document.getElementById("filemezo").innerHTML = osszes;
    }
    else document.getElementById("filemezo").innerHTML = "";
}
function move()
{
x=(screen.width/2)-250;
y=(screen.height/2)-100;
self.moveTo(x,y);
}
function refresh_pickat(){
    data=document.getElementById('kat')[document.getElementById('kat').selectedIndex].value;
    document.location = 'index.php?act=mygalleries&sact=new&katid='+data;
}
function refresh_mozi(){
    data=document.getElementById('mozik')[document.getElementById('mozik').selectedIndex].value;
    document.location = 'index.php?act=mozi&moziid='+data;
}
function add_pic()
{
document.getElementById("fajl_1").innerHTML = "Kép<i>(max. 2 Mb)</i>:";
document.getElementById("fajl_2").innerHTML = "<input type=\"file\" name=\"fotofile[]\" id=\"fotofile[]\" title=\"Elérési út\" >&nbsp;<input type=\"button\" id=\"onemore\" name=\"onemore\" value=\"Még egy kép\" onClick=\"add_pic()\"></td><tr><td width=\"100\" align=\"left\" class=\"basic\"><div id=\"fajl_1\"></div></td><td align=\"left\" class=\"basic\"><div id=\"fajl_2\"></div></td></tr>";
}
function hanyfile(data1) {
    data2=document.getElementById('filenum')[document.getElementById('filenum').selectedIndex].value;
    document.location = 'index.php?act=mygalleries&sact=edit&gal='+data1+'&num='+data2;
}
function pic_open(data,data1)
{
window.open ('main/keptar/pic_big.php?id=' + data + '&p_id=' + data1 + '', 'newwin_1', 'width=500, height=540, top=0, left=0');
}
function send_kpic_open(data)
{
window.open ('main/kulturtopik/send_pic_big.php?id=' + data + '', 'newwin_1', 'width=500, height=350, top=0, left=0');
}
function kpic_open(data)
{
window.open ('main/kulturtopik/pic_big.php?id=' + data + '', 'newwin_1');
}
function pic_open_prog(data,data1)
{
window.open ('main/program/pic_big.php?id=' + data + '&p_id=' + data1 + '', 'newwin_1', 'width=500, height=540, top=0, left=0');
}
function prog_open(data)
{
window.open ('main/program/p_detail.php?id=' + data + '', 'newwin_10', 'width=500, height=200, top=0, left=0, scrollbars=yes');
}
function cpic_open(data,data1)
{
window.open ('main/cikkek/pic_big.php?id=' + data + '&p_id=' + data1 + '', 'newwin_1', 'width=500, height=515, top=0, left=0');
}
function hpic_open(data,data1)
{
window.open ('main/hettemaja/pic_big.php?id=' + data + '&p_id=' + data1 + '', 'newwin_1', 'width=500, height=515, top=0, left=0');
}
function cpic_open2(data,data1)
{
window.open ('main/cikkek/pic_big2.php?id=' + data + '&p_id=' + data1 + '', 'newwin_1', 'width=500, height=515, top=0, left=0');
}
function epic_open(data,data1)
{
window.open ('main/keptar/epic_big.php?id=' + data + '&p_id='+data1+'', 'newwin_2', 'width=500, height=515, top=0, left=0');
}
function bemutat_open(data,data1)
{
window.open ('main/bemutatkozo/pic_big.php?id=' + data + '&p_id=' + data1 + '', 'newwin_1', 'width=500, height=540, top=0, left=0');
}
function keptar_rendez(data1,data2,data3,data4){
    data5 = document.getElementById('rendezes')[document.getElementById('rendezes').selectedIndex].value;
    document.location = 'index.php?p='+data1+'&sp='+data2+'&num='+data3+'&num2='+data4+'&order='+data5;
}
function keptar_rendez_d(data1,data2,data3,data4,data5){
    data6 = document.getElementById('rendezes')[document.getElementById('rendezes').selectedIndex].value;
    document.location = 'index.php?p='+data1+'&sp='+data2+'&p_id='+data3+'&num='+data4+'&num2='+data5+'&order='+data6;
}
function kultur_refresh(data1, data2){
    data3=document.getElementById('k_kat')[document.getElementById('k_kat').selectedIndex].value;
    document.location = 'index.php?p='+data1+'&act='+data2+'&up='+data3;
}
/* --- Képtár --- */
function foto_check()
{
    if (document.getElementById('f_kat').selectedIndex=="0")
  	{
        alert("Kérjük, válasszon kategóriát!");
    	document.getElementById('f_kat').focus();
    	return false;
  	}
    else if (document.getElementById('f_leiras').value=="")
  	{
        alert("Kérjük, adjon leírást a képhez!");
    	document.getElementById('f_leiras').focus();
    	return false;
  	}
    else if (document.getElementById('f_who').value=="")
  	{
        alert("Kérjük, adja meg a nevét!");
    	document.getElementById('f_who').focus();
    	return false;
  	}
    else if (document.getElementById('fotofile').value=="")
  	{
        alert("Kérjük, adja meg a kép elérési útját!");
    	document.getElementById('fotofile').focus();
    	return false;
	}
}
function refresh(data1, data2, data3){
    data4=document.getElementById('lapozo')[document.getElementById('lapozo').selectedIndex].value;
    document.location = 'index.php?p=1&kat='+data1+'&num='+data2+'&num2='+data4+'&order='+data3;
}
function refresh_rendez(data1,data2,data3,data4){
    data5 = document.getElementById('rendezes')[document.getElementById('rendezes').selectedIndex].value;
    document.location = 'index.php?p='+data1+'&sp='+data2+'&num='+data3+'&num2='+data4+'&order='+data5;
}
function cikk_catrendez(data1,data2,data3,data4){
    data5 = document.getElementById('rendezes')[document.getElementById('rendezes').selectedIndex].value;
    document.location = 'index.php?p='+data1+'&sp='+data2+'&num='+data3+'&num2='+data4+'&order='+data5;
}
function blog_rendez(data1,data2,data3){
    data5 = document.getElementById('rendezes')[document.getElementById('rendezes').selectedIndex].value;
    document.location = 'index.php?p='+data1+'&num='+data2+'&num2='+data3+'&order='+data4;
}
function refresh_list(){
    data5=document.getElementById('f_kat')[document.getElementById('f_kat').selectedIndex].value;
    if (data5 != 0) document.location = 'index.php?cat_id=2&subcat_id=7&foto_list='+data5;
    else document.location = 'index.php?cat_id=2&subcat_id=7';
}
/* --- kulturtopik --- */
function kultur_check()
{
    if (document.getElementById('k_kat').selectedIndex=="0")
  	{
        alert("Kérjük, válasszon kategóriát!");
    	document.getElementById('k_kat').focus();
    	return false;
  	}
    else if (document.getElementById('title').value=="")
  	{
        alert("Kérjük, adjon meg egy címet!");
    	document.getElementById('title').focus();
    	return false;
  	}
    else if (document.getElementById('k_who').value=="")
  	{
        alert("Kérjük, adja meg a nevét!");
    	document.getElementById('k_who').focus();
    	return false;
  	}
    tinyMCE.execCommand("mceCleanup");
    tinyMCE.triggerSave();
    if (tinyMCE.getContent() == "" || tinyMCE.getContent() == null)
  	{
        alert("Kérjük, adja meg a feltölteni kívánt dolgot!");
    	document.getElementById('leiras').focus();
    	return false;
	}
}
function kultur_check2()
{
    if (document.getElementById('title').value=="")
  	{
        alert("Kérjük, adjon leírást a képhez!");
    	document.getElementById('title').focus();
    	return false;
  	}
    else if (document.getElementById('k_who').value=="")
  	{
        alert("Kérjük, adja meg a nevét!");
    	document.getElementById('k_who').focus();
    	return false;
  	}
    else if (document.getElementById('fotofile').value=="")
  	{
        alert("Kérjük, adja meg a kép elérési útját!");
    	document.getElementById('fotofile').focus();
    	return false;
	}
}

/* --- Regisztráció --- */
function reg_check()
{
    if (document.getElementById('u_name').value=="")
  	{
        alert("Kérjük, adjon meg egy felhasználónevet!");
    	document.getElementById('u_name').focus();
    	return false;
  	}
    else if (document.getElementById('u_pass').value=="")
  	{
        alert("Kérjük, adjon meg egy jelszót!");
    	document.getElementById('u_pass').focus();
    	return false;
  	}
    else if (document.getElementById('u_pass_re').value=="")
  	{
        alert("Kérjük, adjon meg az ismételt jelszót!");
    	document.getElementById('u_pass_re').focus();
    	return false;
  	}
    else if (document.getElementById('u_pass').value != document.getElementById('u_pass_re').value)
  	{
        alert("A két jelszó nem egyezik!");
    	document.getElementById('u_pass').value="";
    	document.getElementById('u_pass_re').value="";
    	document.getElementById('u_pass').focus();
    	return false;
  	}
    else if (document.getElementById('full_name').value=="")
  	{
        alert("Kérjük, adjon meg a teljes nevét!");
    	document.getElementById('full_name').focus();
    	return false;
  	}
    else if (document.getElementById('u_email').value=="")
  	{
        alert("Kérjük, adja meg az email-címét!");
    	document.getElementById('u_email').focus();
    	return false;
  	}
    else if (document.getElementById('u_email').value!="" && document.getElementById('u_email').value.indexOf('@') == -1 || document.getElementById('u_email').value.indexOf('.') == -1)
  	{
    	alert("Kérjük, adjon meg érvényes email-cimet!");
		document.getElementById('u_email').focus();
		return false;
  	}
}
/* --- Online Kávéház --- */
function kavehaz_rendez(data1,data3,data4){
    data5 = document.getElementById('rendezes')[document.getElementById('rendezes').selectedIndex].value;
    document.location = 'index.php?p='+data1+'&num='+data3+'&num2='+data4+'&order='+data5;
}
function kavehaz_lapoz(data1, data3, data4){
    data5=document.getElementById('temaperlap')[document.getElementById('temaperlap').selectedIndex].value;
    document.location = 'index.php?cat_id='+data1+'&num='+data3+'&num2='+data5+'&order='+data4;
}
function tema_lapoz(data1, data2, data3, data4){
    data5=document.getElementById('lapozo')[document.getElementById('lapozo').selectedIndex].value;
    document.location = 'index.php?cat_id='+data1+'&id='+data5+'&num='+data2+'&num2='+data3+'&order='+data4;
}

/* --- Ötletláda --- */

function check_otlet()
{
    if (document.getElementById('o_name').value=="")
  	{
        alert("Kérjük, adja meg a nevét!");
    	document.getElementById('o_name').focus();
    	return false;
  	}
    else if (document.getElementById('o_email').value=="")
  	{
        alert("Kérjük, adja meg az email-címét!");
    	document.getElementById('o_email').focus();
    	return false;
  	}
    else if (document.getElementById('o_kat').selectedIndex=="0")
  	{
        alert("Kérjük, válasszon kategóriát!");
    	document.getElementById('o_kat').focus();
    	return false;
  	}
    else if (document.getElementById('otlet').value == "")
  	{
        alert("Kérjük, adja meg a feltölteni kívánt dolgot!");
    	document.getElementById('otlet').focus();
    	return false;
	}
}
function naptar()
{

    function initArray()
    {
        this.length = initArray.arguments.length
        for (var i = 0; i < this.length; i++)
        this[i+1] = initArray.arguments[i]
    }
    /*  Hónap névnapjainak meghatározása */
    function havinev(ev,ho,nap) {
    if (ho==1)
    {
        var napok = new initArray("Újév, Fruzsina","Ábel","Genovéva, Benjámin","Titusz, Leona",
        "Simon","Boldizsár","Attila, Ramóna","Gyöngyvér","Marcell",
        "Melánia","Ágota","Ernő","Veronika","Bódog","Lóránt, Loránd",
        "Gusztáv","Antal, Antónia","Piroska","Sára, Márió","Fábián, Sebestyén",
        "Ágnes","Vince, Artúr","Zelma, Rajmund","Timót","Pál","Vanda, Paula",
        "Angelika","Károly, Karola","Adél","Martina, Gerda","Marcella","")
    }
    if (ho==2)
        if ((ev!=2000) && (ev!=2004) && ev!=1996)
        {
            var napok=new initArray("Ignác","Karolina, Aida","Balázs","Ráhel, Csenge","Ágota, Ingrid",
            "Dorottya, Dóra","Tódor, Rómeó","Aranka","Abigél, Alex","Elvira",
            "Bertold, Marietta","Lívia, Lídia","Ella, Linda","Bálint, Valentin",
            "Kolos, Georgina","Julianna, Lilla","Donát","Bernadett","Zsuzsanna",
            "Aladár, Álmos","Eleonóra","Gerzson","Alfréd",
            "Mátyás","Géza","Edina","Ákos, Bátor","Elemér","","")
        }
    else
    {
            var napok=new initArray("Ignác","Karolina, Aida","Balázs","Ráhel, Csenge","Ágota, Ingrid",
            "Dorottya, Dóra","Tódor, Rómeó","Aranka","Abigél, Alex","Elvira",
            "Bertold, Marietta","Lívia, Lídia","Ella, Linda","Bálint, Valentin",
            "Kolos, Georgina","Julianna, Lilla","Donát","Bernadett","Zsuzsanna",
            "Aladár, Álmos","Eleonóra","Gerzson","Alfréd",
            "Szokonap","Mátyás","Géza","Edina","Ákos, Bátor","Elemér","","")
    }
    if (ho==3)
    {
            var napok=new initArray("Albin","Lujza","Kornélia","Kázmér","Adorján, Adrián","Leonóra, Inez",
            "Tamás","NEMZ.NONAP, Zoltán","Franciska, Fanni","Ildikó","Szilárd",
            "Gergely","Krisztián, Ajtony","Matild","NEMZETI ÜNNEP, Kristóf",
            "Henrietta","Gertrúd, Patrik","Sándor, Ede","József, Bánk","Klaudia",
            "Benedek","Beáta, Izolda","Emoke","Gábor, Karina","Irén, Irisz",
            "Emánuel","Hajnalka","Gedeon, Johanna","Auguszta","Zalán","Árpád","" )
    }
    if (ho==4)
    {
            var napok=new initArray("Hugó","Áron","Buda, Richárd","Izidor","Vince","Vilmos, Bíborka",
            "Herman","Dénes","Erhard","Zsolt","Leó, Szaniszló","Gyula","Ida",
            "Tibor","Anasztázia, Tas","Csongor","Rudolf","Andrea, Ilma","Emma",
            "Tivadar","Konrád","Csilla, Noémi","Béla","György","Márk","Ervin",
            "Zita","Valéria","Péter","Katalin, Kitti","" )
    }
    if (ho==5)
    {
            var napok=new initArray("MUNKA ÜNN.,Fülöp, Jakab","Zsigmond","Tímea, Irma","Mónika, Flórián",
            "Györgyi","Ivett, Frida","Gizella","Mihály","Gergely","Ármin, Pálma",
            "Ferenc","Pongrác","Szervác, Imola","Bonifác","Zsófia, Szonja",
            "Mózes, Botond","Paszkál","Erik, Alexandra","Ivó, Milán",
            "Bernát, Felícia","Konstantin","Júlia, Rita","Dezso","Eszter, Eliza",
            "Orbán","Fülöp, Evelin","Hella","Emil, Csanád","Magdolna",
            "Janka, Zsanett","Angéla, Petronella","" )
    }
    if (ho==6)
    {
            var napok=new initArray("Tünde","Kármen, Anita","Klotild","Bulcsú","Fatime","Norbert, Cintia",
            "Róbert","Medárd","Félix","Margit, Gréta","Barnabás","Villo",
            "Antal, Anett","Vazul","Jolán, Vid","Jusztin","Laura, Alida",
            "Arnold, Levente","Gyárfás","Rafael","Alajos, Leila","Paulina",
            "Zoltán","Iván","Vilmos","János, Pál","László","Levente, Irén",
            "Péter, Pál","Pál","" )
    }
    if (ho==7)
    {
            var napok=new initArray("Tihamér, Annamária","Ottó","Kornél, Soma","Ulrik","Emese, Sarolta",
            "Csaba","Appolónia","Ellák","Lukrécia","Amália","Nóra, Lili",
            "Izabella, Dalma","Jeno","Ors, Stella","Henrik, Roland","Valter",
            "Endre, Elek","Frigyes","Emília","Illés","Dániel, Daniella",
            "Magdolna","Lenke","Kinga, Kincso","Kristóf, Jakab","Anna, Anikó",
            "Olga, Liliána","Szabolcs","Márta, Flóra","Judit, Xénia","Oszkár","" )
    }
    if (ho==8)
    {
            var napok=new initArray("Boglárka","Lehel","Hermina","Domonkos, Dominika","Krisztina",
            "Berta, Bettina","Ibolya","László","Emod","Lörinc",
            "Zsuzsanna, Tiborc","Klára","Ipoly","Marcell","Mária","Ábrahám",
            "Jácint","Ilona","Huba","ALKOTMÁNY ÜNN., István","Sámuel, Hajna",
            "Menyhért, Mirjam","Bence","Bertalan","Lajos, Patrícia","Izsó",
            "Gáspár","Ágoston","Beatrix, Erna","Rózsa","Erika, Bella")
    }
    if (ho==9)
    {
            var napok= new initArray("Egyed, Egon","Rebeka, Dorina","Hilda","Rozália","Viktor, Lorinc",
            "Zakariás","Regina","Mária, Adrienn","Ádám","Nikolett, Hunor",
            "Teodóra","Mária","Kornél","Szeréna, Roxána","Eniko, Melitta","Edit",
            "Zsófia","Diána","Vilhelmina","Friderika","Máté, Mirella","Móric",
            "Tekla","Gellért, Mercédesz","Eufrozina, Kende","Jusztina","Adalbert",
            "Vencel","Mihály","Jeromos","" )
    }
    if (ho==10)
    {
            var napok= new initArray("Malvin","Petra","Helga","Ferenc","Aurél","Brúnó, Renáta","Amália",
            "Koppány","Dénes","Gedeon","Brigitta","Miksa","Kálmán, Ede","Helén",
            "Teréz","Gál","Hedvig","Lukács","Nándor","Vendel","Orsolya","Előd",
            "KÖZT.KIKIÁLT., Gyöngyi","Salamon","Blanka, Bianka","Dömötör",
            "Szabina","Simon, Szimonetta","Nárcisz","Alfonz","Farkas","" )
    }
    if (ho==11)
    {
            var napok=new initArray("Marianna","Achilles","Gyozo","Károly","Imre","Lénárd","Rezso",
            "Zsombor","Tivadar","Réka","Márton","Jónás, Renátó","Szilvia",
            "Aliz","Albert, Lipót","Ödön","Hortenzia, Gergo","Jeno","Erzsébet",
            "Jolán","Olivér","Cecília","Kelemen, Klementina","Emma","Katalin",
            "Virág","Virgil","Stefánia","Taksony","András, Andor","" )
    }
    if (ho==12)
    {
            var napok=new initArray("Elza","Melinda, Vivien","Ferenc, Olívia","Borbála, Barbara","Vilma",
            "Miklós","Ambrus","Mária","Natália","Judit","Árpád","Gabriella",
            "Luca, Otília","Szilárda","Valér","Etelka, Aletta","Lázár, Olimpia",
            "Auguszta","Viola","Teofil","Tamás","Zéno","Viktória","Ádám, Éva",
            "KARÁCSONY, Eugénia","KARÁCSONY, István","János","Kamilla",
            "Tamás, Tamara","Dávid","Szilveszter","")
    }
return napok[nap]
}

/* Hónap neve */
function honev(ho) {
    var month = new initArray("Január","Február","Március","Április","Május","Junius","Július","Augusztus","Szeptember","Október","November","December");
    return month[ho]
}
/* Nap neve */
function napnev(szam) {
    var napok = new initArray("Vasárnap","Hétfo","Kedd","Szerda","Csütörtök","Péntek","Szombat","Vasárnap")
    return napok[szam]
}
var today = new Date()
var month = today.getMonth() + 1
if (month<10) honap="0"+month;
else honap = month;
var day = today.getDate()
if (day<10) nap="0"+day;
else nap = day;
var year = today.getFullYear()
document.getElementById('nevnap_box').innerHTML = "<span class=nevnap_szoveg>"+year+"."+honap+"."+nap+"."+" <strong>"+havinev(year,month,day)+"</strong> napja van.</span>";
}
function get_prog_mainkat()
{
    data2=document.getElementById('prog_type')[document.getElementById('prog_type').selectedIndex].value;
    document.location = 'index.php?p=myprog_new&kibont='+data2;
}
function get_prog_subkat()
{
    data1=document.getElementById('prog_type')[document.getElementById('prog_type').selectedIndex].value;
    data2=document.getElementById('prog_mainkat')[document.getElementById('prog_mainkat').selectedIndex].value;
    document.location = 'index.php?p=myprog_new&kibont='+data1+'&kibont2='+data2;
}
function open_org()
{
window.open ('new_org.php', 'newwin', 'width=300, height=100, top=0, left=0');
}
function aktival(data) {
    var kerulet=document.getElementById('prog_loc')[document.getElementById('prog_loc').selectedIndex].value;

    var e = document.getElementById(data);
    if (kerulet == 0)
    {
    e.style.visibility =  'visible';
    }
    else e.style.visibility = 'hidden';
}
function taginsert(tag) {
	var text = document.newpost.message.value;
	text = text+tag;
	document.newpost.message.value = text;
	document.newpost.message.focus();
}
function cursor_pos(obj)
{
  if (!document.all) return;

  if (obj.isTextEdit) 
    obj.caretPos = document.selection.createRange();
}
function insertsmiley(smiley) {
	var text = document.newpost.message.value;
	text = text+' '+smiley+' ';
	document.newpost.message.value = text;
	document.newpost.message.focus();
}
function taginsert(tag) {
	var text = document.newpost.message.value;
	text = text+tag;
	document.newpost.message.value = text;
	document.newpost.message.focus();
}
function new_link(hova) {
	nameLink = prompt("A link neve:","Ide írja be a link nevét");
	nameUrl = prompt("Az url:","http://");
	if ( ( nameLink != null && nameLink != "Ide írd be a link nevét") && ( nameUrl != null && nameUrl != "http://" ) )
	{
		var re = new RegExp('[\n\r]','gi');
		var re2 = new RegExp(' ','gi');
		var NewnameUrl = nameUrl.replace(re,'');
		var NewnameUrl2 = NewnameUrl.replace(re2,'%20');
		var nameUrl=NewnameUrl2;
//		alert('AAA:'+ nameUrl +':AAA');
		document.getElementById(hova).value += "<a href="+nameUrl+">"+nameLink+"</a>";
		document.getElementById(hova).focus();
	}
}
function toggle(id,osszes) {
  var e = document.getElementById(id)
/*	for (var x = 1; x <= osszes; x++)
	{
  		var f = document.getElementById(x);
  		f.style.display="none";
	}*/
  	e.style.display = e.style.display == "none" ? "" : "none";
}

/*IMAGEFADE-EFFECT*/

function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=obj.degree/100
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}
function CreateBookmarkLink(cimsor,link) {

 title = cimsor; 
 url = "http://"+link;

	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { // Opera Hotlist
		return true; }
 }