function expandIt(objectID) { 
	var theElementStyle = document.getElementById(objectID+"Child"); 
	if(theElementStyle.style.display == "block") {
		theElementStyle.style.display = "none";
	} else {
		//najskor vsetky Childy upraceme
		var div = document.getElementsByTagName('div');
		for(i=0; i<div.length; i++){
			if((/(Child)/i).test(div[i].id)){
				div[i].style.display = "none";
			}
		} 
		theElementStyle.style.display = "block";
	} 
} 
function addbookmark(){
	if (window.external){
		window.external.AddFavorite(urlAddress,pageName);
	} else{ 
		alert("Sorry! Your browser doesn't support this function.");
	}
}

//tieto funkcie netusim naco sluzia, dozviem sa to snad neskor  :)

var dom = document.getElementById ? true:false;
var ie4 = document.all ? true:false; 

function CheckAll(checked) {
    len = document.lightbox.elements.length;
    var i=0;
    for( i=0; i<len; i++) {
        if (document.lightbox.elements[i].name=='item') {
           document.lightbox.elements[i].checked=checked;
        }
    }
}

function CheckAllPPD(checked) {
    len = document.ppd.elements.length;
    var i=0;
    for( i=0; i<len; i++) {
        if (document.ppd.elements[i].name=='media') {
           document.ppd.elements[i].checked=checked;
        }
    }
    if (reprice_defined) reprice();
}

function setSpex () {
	var spex = "spex=";
	if (document.body) {
		spex += "sw&" + screen.width;
		spex += "&sh&" + screen.height;
		spex += "&cw&" + document.body.clientWidth;
		spex += "&ch&" + document.body.clientHeight;
	} else if (window.innerWidth) {
		spex += "cw&" + window.innerWidth;
		spex += "&ch&" + window.innerHeight;
	} else {
		return;
	}
	var now = new Date();
	var expiry = new Date(now.getFullYear() + 1, now.getMonth(), now.getDate());
	spex += "; path=/; expires=" + expiry.toGMTString();
	document.cookie = spex;
	return true;
}

window.onresize = setSpex;
//window.onload = setSpex;


function _als () {window.status = 'Add To Lightbox'; return true}
function _sls () {window.status = 'View Image Specs'; return true}
function _dls () {window.status = 'View Details'; return true}
function _pls () {window.status = 'Processing...'; return true}
function _cls () {window.status = ''; return true}

function sf(){
	if(document.frm_search && document.frm_search.search_query) document.frm_search.search_query.focus();
}

function isEmail(string) {
    if (string.search(/^\w+((-\w+)|(\.\w+))*\@\w+(((\.|-)\w+)*)?\.\w+$/) != -1)
        return true;
    else
        return false;
}
