﻿if (!window.console) {
    window.console = {
        log: function (a1,a2,a3,a4,a5,a6) {
					/*
            var console = document.getElementById('myconsole');
            if (console)
            console.innerHTML += [a1,a2,a3,a4,a5,a6].join(', ') + '<br />';
						*/
        }
    };
}

function createBookmarkLink(obj) {
    var title = "Pamediakopes.gr",
        url = document.getElementById('homepagelink').href;

    if (window.sidebar) 
    { // Mozilla
        window.sidebar.addPanel(title, url,'');
    } 
    else if( window.external ) 
    { // IE Favorite
        window.external.AddFavorite( url, title); 
    }
    else if(window.opera && window.print) { // Opera 
        obj.setAttribute('href',url);
        obj.setAttribute('title',title);
        obj.setAttribute('rel','sidebar');
        obj.click();
    }
    return false;
}

/* Patch for the space between different elements inside boxes */
$(document).ready(function(){
/*@cc_on @*/
/*@if (@_jscript_version <= 5.6)
    $('.boxcontent p+h3').add('.boxcontent p+p').css('margin-top','10px');
@end @*/ 
    /* Patches other layouts too */
});

/* Netvolution re-positioning hacks 
 *
 * Netvolution only accepts content in one specific place. If you
 * want a page to update content in different parts of a template,
 * you need to use an alternative way (like this).
 *
 * Here we use javascript to move the content to the right place.
 *
 * Also other pages may need to get content from there. This content
 * should be retrieved before the div#NetvolutionPageContent is deleted.
 
 * For that reason there is a trigger bound to that div called "beforeDelete",
 *
 * You can bind the code you need to that even in order to retrieve the elements you
 * need before the content block is deleted.
 *
*/
$(document).ready(function() {
	/* Get the container */
	var container = document.getElementById('NetvolutionPageContent');
	if (container == null) return;
	/* jQuery wrapper for the container */
	var netvolutionPageContent = $(container);
	
	/* Process children */
	netvolutionPageContent.children().each(function() {
		if (this.id.length < 1) return;
		var destination = document.getElementById(this.id+'box');
		if (destination == null) return;
		
		if (this.nodeName.toUpperCase() == "IMG") {
			destination.parentNode.replaceChild(this,destination);
		}
		else {
			destination.innerHTML = this.innerHTML;
		}
	});
	/* Process any data by other pieces of code */
	netvolutionPageContent.trigger("beforeDelete");
	/* Clean up. */
	netvolutionPageContent.remove();
});



