

// LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
// LLLL                             DOM READY JS                           LLLLL
// LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL

window.addEvent('domready', function() {
    
    createBookmarks();
    
});



// LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
// LLLL                             BOOKMARK                               LLLLL
// LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL

sbmark_arr = new Array();

function createBookmarks() {

	var icons_Div = document.getElementById("bookmarkservices");
	var img;
	var a_tag;
	var li;
	var ul;
	var n=0;
	
	var this_url = encodeURIComponent(location.href);
	var this_title = encodeURIComponent(document.title);
	var this_descr = GetMetaValue('description');
	var this_kwords = GetMetaValue('keywords');
	
	/*
	new Array('Alltagz','http://www.alltagz.de/login/?action=add&address='+this_url+'&title='+this_title, 'alltagz.png'),
	new Array('Digg','http://digg.com/submit?url='+this_url+'&title='+this_title, 'digg.png'),
	new Array('Technorati','http://technorati.com/faves?sub=addfavbtn&amp;add='+this_url, 'technorati.png'),
	new Array('YiGG','http://www.yigg.de/neu?exturl='+this_url+'&exttitle='+this_title, 'yigg.png'),
	*/
	
    sbmark_arr = new Array(
                new Array('Deutsche Hotelnews','http://www.deutsche-hotelnews.de/addthis.php?url='+this_url,'hotelnews.png'),
    			new Array('Mister Wong','http://www.mister-wong.de/index.php?action=addurl&bm_url='+this_url+'&bm_description='+this_descr,'mister-wong.png'),
    			new Array('Kledy','http://www.kledy.de/submit.php?url='+this_url,'Kledy.png'),
    			new Array('folkd','http://www.folkd.com/submit/page/'+this_url, 'folkd.png'),
    			new Array('LinkARENA','http://linkarena.com/bookmarks/addlink/?url='+this_url+'&title='+this_title+'&desc='+this_descr+'&tags='+this_kwords, 'linkarena.png'),
    			new Array('oneview','http://www.oneview.de/add/?URL='+this_url+ '&title='+this_title, 'oneview.png'),
    			new Array('WEB NEWS','http://www.webnews.de/einstellen?url='+this_url+'&title='+this_title, 'webnews.png'),
    			new Array('facebook','http://www.facebook.com/sharer.php?u='+this_url+'&t='+this_title, 'facebook.png'),
    			new Array('twitter','http://twitter.com/home?status='+this_title+'-'+this_url, 'twitter.png'),
    			new Array('delicious','http://delicious.com/save?v=5&noui&jump=close&url='+this_url+'&title='+this_title, 'delicious.png'),
    			new Array('Blogger','http://blogger.com/', 'blogger.png'),
    			new Array('google','http://www.google.com/bookmarks/mark?op=add&hl=de&bkmk='+this_url+'&title='+this_title, 'google.png'),
    			new Array('icio','http://www.icio.de/add.php?url='+this_url+'&title='+this_title, 'icio.png'),
    			new Array('Favoriten.de','http://www.favoriten.de/url-hinzufuegen.html?bm_url='+this_url+'&bm_title='+this_title, 'favoriten.png'),
    			new Array('TAGMARKS','http://tagmarks.de/?go=1&url='+this_url, 'tagmarks.png')
    );
	
	ul = document.createElement("ul");
    ul.id = "bookmarklist";
    
	while(n < sbmark_arr.length) {
        
        a_tag = document.createElement("a");
        // a_tag.className="dock-item2";
		img = document.createElement("img");
		img.id = n;
		img.src = "js/bookmarks/"+sbmark_arr[n][2];
		img.alt = sbmark_arr[n][0];
		img.title = sbmark_arr[n][0];
		img.onclick = function() { clickBookmarks(this.id); };
		img.onmouseover = function() { overBookmarks(this.id); };
		img.onmouseout = function() { outBookmarks(this.id); };
		li = document.createElement("li");
		a_tag.appendChild(img);
		li.appendChild(a_tag);
		ul.appendChild(li);
		n++;
	}
    icons_Div.appendChild(ul);
}

function clickBookmarks(sb_id) {
	
	var sb_link = sbmark_arr[sb_id][1];
	window.open(sb_link, '_blank');
}

function overBookmarks(sb_id) {
	
	var ic = document.getElementById(sb_id);
	ic.style.marginBottom = "10px";
	ic.style.marginTop = "0px";
}

function outBookmarks(sb_id) {

	var ic = document.getElementById(sb_id);
	ic.style.marginBottom = "0px";
	ic.style.marginTop = "10px";
}




function GetMetaValue(meta_name) {

    var my_arr=document.getElementsByTagName("META");
    for (var counter=0; counter<my_arr.length; counter++) {
        if (my_arr[counter].name.toLowerCase() == meta_name.toLowerCase()) {
            if (meta_name.toLowerCase()=="description" && meta_name.toLowerCase()=="") { my_arr[counter].content=document.title; };
            return my_arr[counter].content;
           }
    }
    return document.title;
}

// LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
// LLLL                        googlemaps onsubmit                         LLLLL
// LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
/*
window.onload = function () {
    
    if (typeof googlemaps_form) {
        document.forms['googlemaps_form'].onsubmit = function() {
         // alert("googlemaps_form");
         var icons_Div = document.getElementById("gd_map_canvas").style.height="600px";
         // return false;
        }
    }

}
*/




















