if(window.location.href != 'http://www.sylvestvvs.dk/' || window.location.href != 'http://www.sylvestvvs.dk/default.htm')
//enableFrameURL();

var timer;
function scrollFrame(frame,interval,move) {
	if (timer) clearTimeout(timer);
	if (window.frames[frame]) {
		if (move == "m") window.frames[frame].scrollBy(0, interval);
		else window.frames[frame].scrollBy(interval, 0);
		timer = setTimeout("scrollFrame('" + frame + "'," + interval + ",'" + move + "')", 20);
	}
}
function stopScroll() { if (timer) clearTimeout(timer); }

function submitToPopup(formref){ 
    newwin = window.open('about:blank','newWindow','height=650,width=650,left=250,top=5,titlebar=no');
    formref.submit();
    newwin.focus();
}

function enableFrameURL(){ //loaded by all other pages than the default page...
	if(top==self){ //if this page is the same as the URL address.
		var pageURL = window.location.href.substr(24, window.location.href.length);
		//var thisFile = pageURL.substr(pageURL.lastIndexOf('/')+1, pageURL.length);
		top.location.href="http://www.sylvestvvs.dk?"+pageURL; //then load the default page with parameters
	}
}

function loadFramePage(){ //loaded by the default page only!!!
	if (location.search!=""){ //if we got parameters... otherwise we do not want to consider...
		var src=unescape(location.search.substring(1));
		parent.frames['mainframe'].location.href=src;
		return;
	}
}


/*
function enableFrameURL() {
	var pageURL = window.location.href;
	var pageFile= pageURL.substr(pageURL.lastIndexOf('/')+1, pageURL.length);
	
	if(window.location.href != 'http://www.sylvestvvs.dk/' && parent.location.href.substr(7,17) == 'www.sylvestvvs.dk') {
		//alert('in here' +pageFile)
		loadSource();
	}else{
		return;
	}
}
function loadSource() { //use this function to load pages into frames....
	if (location.search!=""){
		var src=unescape(location.search.substring(1));
		parent.frames['mainframe'].location.href=src;
		return;
	}else{
		var pageURL = window.location.href.substr(24, window.location.href.length);
		var pageFile= pageURL.substr(pageURL.lastIndexOf('/')+1, pageURL.length);
		parent.location.href = "http://www.sylvestvvs.dk/?"+pageURL;		
	}
}
*/
