function submit()
{
	document.getElementById('form').submit()
}
function submitForm(form)
{
    document.getElementById(form).submit()
}
function supplierChoose(id)
{
    document.getElementById('adId').value=id
	document.getElementById('supplierChoose').submit()
}
function printAd(id)
{
    document.getElementById('adId').value=id
    document.getElementById('print').value="print"
    document.getElementById('supplierChoose').submit()
    
}
function venster(URL,pos) {
    var height=screen.availHeight-pos-50
    window.open(URL, '_blank', 'location=0, width=770, height='+height+',left='+pos+',top='+pos+', resizable=0, menubar=0, titlebar=0,scrollbars=1, status=no, toolbar=0');
}

function category(category){
    document.getElementById('category').value=category
	document.getElementById('formChoise').submit()
}

var sloganNumber=rand(1,11)
var t

function sloganGo()
{
    
    slogantxt1='slogan'.concat(sloganNumber.toString())
    sloganNumber2=sloganNumber-1
    if(sloganNumber2==0){sloganNumber2=11}
    slogantxt2='slogan'.concat(sloganNumber2.toString())
    document.getElementById(slogantxt1).style.display='block'
    document.getElementById(slogantxt2).style.display='none'
    sloganNumber=sloganNumber+1
    if(sloganNumber>11){sloganNumber=1}
    //t=setTimeout('sloganGo()',4000)

}

function algVoorwaardenOK()
{
    if (document.getElementById('registerInput').disabled==false)
    {
        document.getElementById('registerInput').disabled=true
        document.getElementById('algVoorwaarden').checked=false
    }
    else
    {
        document.getElementById('registerInput').disabled=false
        document.getElementById('algVoorwaarden').checked=true
    }
}

function rand(a,b)
{
    num = Math.random();
    num = (num*(b-a))+a;
    num = Math.round(num);
    return num;
}
function setfocus(txt)
{
    var i = document.getElementById(txt);
    if( i != null)
    {
        i.focus();
    }
}
function url(url)
{
	window.location=url
}

var leftIndex=234
var tijd
var pixelTeller=0
function scrollShop()
{
	//alert('serbner')
	index=leftIndex.toString().concat('px')
	document.getElementById('winkels').style.left=index
        leftIndex=leftIndex-2
        pixelTeller=pixelTeller+1
        if(leftIndex<-winkelsLength){
            leftIndex=234
            pixelTeller=0
        }     
        if(pixelTeller==118){
            pixelTeller=0
            tijd=setTimeout('scrollShop()',1000)
        }else{
            tijd=setTimeout('scrollShop()',1)
        }
}
function scrollStop()
{
    if (tijd) clearTimeout(tijd);
}
function scrollResume()
{
    tijd=setTimeout('scrollShop()',15)
}
function borderOn(id)
{
    document.getElementById(id).style.borderColor="blue"
}
function borderOff(id)
{
    document.getElementById(id).style.borderColor="white"
}
function mouseOver(item)
{
item.style.backgroundColor="#dddddd"
item.style.cursor='hand'

}
function mouseOut(item)
{
item.style.backgroundColor=""
}
function go(url)
{
window.location.assign(url)
}
var onoff=2
function showDiv(id)
{
    if(onoff==1)
    {
        document.getElementById(id).style.display="block"
        document.getElementById("reactionsLink").innerHTML="Verberg reacties"
        onoff=2
    }
    else
    {
        document.getElementById(id).style.display="none"
        document.getElementById("reactionsLink").innerHTML="Toon/schrijf reacties"        
        onoff=1
    }
    
}
var oldFeature='adsFeature'
function showFeature(feature)
{
        document.getElementById(oldFeature).style.display="none"
        document.getElementById(feature).style.display="block"  
        oldFeature=feature
}

function showPhoto(photo,blockNumber)
{

        document.getElementById(oldPhoto[parseInt(blockNumber)]).style.display="none"
        document.getElementById(photo).style.display="block"  
        oldPhoto[blockNumber]=photo
}
var oldIdnewsSum='newsSum0'
function background(id,kleur,id2,source,height,width)
{  
    document.getElementById(oldIdnewsSum).style.backgroundColor="white"
    document.getElementById(id).style.backgroundColor=kleur
    document.getElementById(id2).src=source
    document.getElementById(id2).height=height
    document.getElementById(id2).width=width
    oldIdnewsSum=id
}
function uploadLogo()
{
    document.getElementById('shopInfo').submit()
}
function goToAnchor(anchor) {
    location.href = anchor;
}

function showCats(id){
    if(document.getElementById(id).style.display=="none")
    {
        document.getElementById(id).style.display="block"
        document.getElementById("folderCat").src="/images/dblArrowUp.gif"
        document.cookie ='showCats=TRUE;path=/'
    }
    else
    {
        document.getElementById(id).style.display="none"
        document.getElementById("folderCat").src="/images/dblArrowDown.gif"  
        document.cookie ='showCats=FALSE;path=/'        
    }
}


function showItem(item){


    document.getElementById(oldItem).style.display="none"
    if(!(oldItem=='tmpWhite')){
        document.getElementById(oldItem+'Td').className ="inActiveTab"
        document.getElementById(oldItem+'a').className ="inActiveTab"
    }
    
    document.getElementById(item).style.display="block"
    document.getElementById(item+'Td').className ="activeTab"
    document.getElementById(item+'a').className ="activeTab"
    
    oldItem=item
}

function uploadAd()
{
    document.getElementById('adLoading').src='/images/uploading.jpg'
    document.getElementById('uploadIcon').src='/images/uploadIcon.jpg'
}
var uploadIconLeftIndex=295
var tijd2

function uploading()
{
    uploadIconLeft=uploadIconLeftIndex.toString().concat('px')
    document.getElementById('uploadIcon').style.left=uploadIconLeft
    uploadIconLeftIndex=uploadIconLeftIndex+1
	if(uploadIconLeftIndex>650){uploadIconLeftIndex=310}
    if(uploadIconLeftIndex==305){uploadAdNow()}
	tijd2=setTimeout('uploading()',1)

}
function uploadAdNow()
{
    document.getElementById('adUpload').submit()
}

function pausecomp(millis)
{
var date = new Date();
var curDate = null;

do { curDate = new Date(); }
while(curDate-date < millis);
} 

function newsSubmit(id,todo,index)
{
    document.getElementById("newsId2").value=id
    document.getElementById("newsAction").value=todo
    //alert(document.getElementById("newsHeadlines").detElementById("newsId").value)
    if(todo=='delete')
    {
        url='/clientNews.php#'.toString().concat(index)
        document.getElementById("newsHeadlines").action=url
    }
    if(todo=='edit')
    {
        url='/clientNews.php#edit'
        document.getElementById("newsHeadlines").action=url
    }	
    document.getElementById("newsHeadlines").submit()
}

function agendaSubmit(id,todo,index)
{
    document.getElementById("agendaId2").value=id
    document.getElementById("agendaAction").value=todo
    //alert(document.getElementById("newsHeadlines").detElementById("newsId").value)
    if(todo=='delete')
    {
        url='/clientAgenda.php#'.toString().concat(index)
        document.getElementById("newsHeadlines").action=url
    }
	if(todo=='edit')
    {
        url='/clientAgenda.php#edit'
        document.getElementById("newsHeadlines").action=url
    }	
    document.getElementById("newsHeadlines").submit()
}

function zoeken()
{
    document.getElementById("googlesearchBox").submit()
    
    //if(!(empty(zoekTerm))){
    //    url='http://www.google.com/search?sitesearch=www.destadin.nl&as_q='.concat(zoekTerm)
    //    window.open(url,"_blank","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no,copyhistory=yes, width=800, height=500")
    //}
}
function submitShopSearch()
{
    document.getElementById('googlesearchBox').method='post'
    document.getElementById('googlesearchBox').action='advertisers.php'
    document.getElementById("googlesearchBox").submit()

}
function bookmark()
{
window.external.AddFavorite("http://www.destadin.nl","deStadin")
}

/**************************** STAR RATING SYSTEM ******************************/
/* Get the element by id to set its property */
function $(v) 
{ 
	return(document.getElementById(v)); 
} // end $()

// Handles the mouseover on/off events
function showCurr( rating, star, status )
{
	// if NVT on, the rating is disabled:
	if($(rating + "checkbox").checked == false)
	{
		// If mouse over the star
		// manage the correct output:
		if( status == "on" )
		{
			setStar( star, rating );
		} // end if
		// if mouse removed, set the old rating:
		else 
		{
			var starNum = $(rating).value;
			setStar(rating+'_star'+starNum, rating);
		} // end else
	} // end if
	return;
} // end showCurr()

// Manages the graphical output of the stars:
function setStar( star, rating )
{
	// Let`s get the star number:
	var starNum = star.match(/\d+$/)[0]; 
	var starImage;
	
	// Version for any ordered stars
	var starDown = starNum;
	// Let`s set the all stars precedin our star on
	while($(rating+'_star'+starDown) != null)
	{
		$(rating+'_star'+starDown).src = '/images/starOn.gif';			
		starDown--;
	} // end while
	// Let`s set all the stars following our star out
	starNum++;
	while($(rating+'_star'+starNum) != null)
	{
		$(rating+'_star'+starNum).src = '/images/starOff.gif';			
		starNum++;
	} // end while


/*
	// Version for ordered star rows beginning with star1 
	// (computationally efficient)
	var starDown = 1;

	while($('star'+starDown) != null)
	{
		(starDown<=starNum)?
		($('star'+starDown).src = 'starOn.gif'):
		($('star'+starDown).src = 'starOff.gif');	
		starDown++;
	} // end while
*/

	return; 
} // end setStar()

function setRating( star, rating )
{
	if($(rating + "checkbox").checked == false)
	{
		// Let`s get the star number:
		var starNum = star.match(/\d+$/)[0]; 
		// Set the rating on the star value:
		$(rating).value = starNum;
		} // end if
	return;
} // end setRating()

// handles the NietVanToepassing event
function nvt( rating )
{
	var starImage;
	// depending on our current NVT value...
	// turn the stars off:
	if($(rating + "checkbox").checked == true) 		
		starImage = '/images/starGray.gif';
	// or turn the stars on:
	else starImage = '/images/starOff.gif';
	
	
	// not depending on the old value of rating, set it to 0:
	$(rating).value = '0';
	
	// actual turning stars on/off
	var turnIt = 1;
	while(turnIt <= 5)
	{
		$(rating+'_star'+turnIt).src = starImage;
		turnIt++;
	} // end while

	
} // end nvt()
/******************************************************************************/

// ===================================================================
// Author: Matt Kruse <matt@mattkruse.com>
// WWW: http://www.mattkruse.com/
//
// NOTICE: You may use this code for any purpose, commercial or
// private, without any further permission from the author. You may
// remove this notice from your final code if you wish, however it is
// appreciated by the author if at least my web site address is kept.
//
// You may *NOT* re-distribute this code in any way except through its
// use. That means, you can include it in your product, or your web
// site, or any other form where the code is actually being used. You
// may not put the plain javascript up on your site for download or
// include it in your javascript libraries for download. 
// If you wish to share this code with others, please just point them
// to the URL instead.
// Please DO NOT link directly to my .js files from your site. Copy
// the files to your server and use them there. Thank you.
// ===================================================================

// HISTORY
// ------------------------------------------------------------------
// April 20, 2005: Fixed the removeSelectedOptions() function to 
//                 correctly handle single selects
// June 12, 2003: Modified up and down functions to support more than
//                one selected option
/*
DESCRIPTION: These are general functions to deal with and manipulate
select boxes. Also see the OptionTransfer library to more easily 
handle transferring options between two lists

COMPATABILITY: These are fairly basic functions - they should work on
all browsers that support Javascript.
*/


// -------------------------------------------------------------------
// hasOptions(obj)
//  Utility function to determine if a select object has an options array
// -------------------------------------------------------------------
function hasOptions(obj) {
	if (obj!=null && obj.options!=null) { return true; }
	return false;
	}

// -------------------------------------------------------------------
// selectUnselectMatchingOptions(select_object,regex,select/unselect,true/false)
//  This is a general function used by the select functions below, to
//  avoid code duplication
// -------------------------------------------------------------------
function selectUnselectMatchingOptions(obj,regex,which,only) {
	if (window.RegExp) {
		if (which == "select") {
			var selected1=true;
			var selected2=false;
			}
		else if (which == "unselect") {
			var selected1=false;
			var selected2=true;
			}
		else {
			return;
			}
		var re = new RegExp(regex);
		if (!hasOptions(obj)) { return; }
		for (var i=0; i<obj.options.length; i++) {
			if (re.test(obj.options[i].text)) {
				obj.options[i].selected = selected1;
				}
			else {
				if (only == true) {
					obj.options[i].selected = selected2;
					}
				}
			}
		}
	}
		
// -------------------------------------------------------------------
// selectMatchingOptions(select_object,regex)
//  This function selects all options that match the regular expression
//  passed in. Currently-selected options will not be changed.
// -------------------------------------------------------------------
function selectMatchingOptions(obj,regex) {
	selectUnselectMatchingOptions(obj,regex,"select",false);
	}
// -------------------------------------------------------------------
// selectOnlyMatchingOptions(select_object,regex)
//  This function selects all options that match the regular expression
//  passed in. Selected options that don't match will be un-selected.
// -------------------------------------------------------------------
function selectOnlyMatchingOptions(obj,regex) {
	selectUnselectMatchingOptions(obj,regex,"select",true);
	}
// -------------------------------------------------------------------
// unSelectMatchingOptions(select_object,regex)
//  This function Unselects all options that match the regular expression
//  passed in. 
// -------------------------------------------------------------------
function unSelectMatchingOptions(obj,regex) {
	selectUnselectMatchingOptions(obj,regex,"unselect",false);
	}
	
// -------------------------------------------------------------------
// sortSelect(select_object)
//   Pass this function a SELECT object and the options will be sorted
//   by their text (display) values
// -------------------------------------------------------------------
function sortSelect(obj) {
	var o = new Array();
	if (!hasOptions(obj)) { return; }
	for (var i=0; i<obj.options.length; i++) {
		o[o.length] = new Option( obj.options[i].text, obj.options[i].value, obj.options[i].defaultSelected, obj.options[i].selected) ;
		}
	if (o.length==0) { return; }
	o = o.sort( 
		function(a,b) { 
			if ((a.text+"") < (b.text+"")) { return -1; }
			if ((a.text+"") > (b.text+"")) { return 1; }
			return 0;
			} 
		);

	for (var i=0; i<o.length; i++) {
		obj.options[i] = new Option(o[i].text, o[i].value, o[i].defaultSelected, o[i].selected);
		}
	}

// -------------------------------------------------------------------
// selectAllOptions(select_object)
//  This function takes a select box and selects all options (in a 
//  multiple select object). This is used when passing values between
//  two select boxes. Select all options in the right box before 
//  submitting the form so the values will be sent to the server.
// -------------------------------------------------------------------
function selectAllOptions(obj) {
	if (!hasOptions(obj)) { return; }
	for (var i=0; i<obj.options.length; i++) {
		obj.options[i].selected = true;
		}
	}
	
// -------------------------------------------------------------------
// moveSelectedOptions(select_object,select_object[,autosort(true/false)[,regex]])
//  This function moves options between select boxes. Works best with
//  multi-select boxes to create the common Windows control effect.
//  Passes all selected values from the first object to the second
//  object and re-sorts each box.
//  If a third argument of 'false' is passed, then the lists are not
//  sorted after the move.
//  If a fourth string argument is passed, this will function as a
//  Regular Expression to match against the TEXT or the options. If 
//  the text of an option matches the pattern, it will NOT be moved.
//  It will be treated as an unmoveable option.
//  You can also put this into the <SELECT> object as follows:
//    onDblClick="moveSelectedOptions(this,this.form.target)
//  This way, when the user double-clicks on a value in one box, it
//  will be transferred to the other (in browsers that support the 
//  onDblClick() event handler).
// -------------------------------------------------------------------
function moveSelectedOptions(from,to) {
	// Unselect matching options, if required
	if (arguments.length>3) {
		var regex = arguments[3];
		if (regex != "") {
			unSelectMatchingOptions(from,regex);
			}
		}
	// Move them over
	if (!hasOptions(from)) { return; }
	for (var i=0; i<from.options.length; i++) {
		var o = from.options[i];
		if (o.selected) {
			if (!hasOptions(to)) { var index = 0; } else { var index=to.options.length; }
			to.options[index] = new Option( o.text, o.value, true, true);
			}
		}
	// Delete them from original
	for (var i=(from.options.length-1); i>=0; i--) {
		var o = from.options[i];
		if (o.selected) {
			from.options[i] = null;
			}
		}
	if ((arguments.length<3) || (arguments[2]==true)) {
		sortSelect(from);
		sortSelect(to);
		}
	from.selectedIndex = -1;
	to.selectedIndex = -1;
	}

// -------------------------------------------------------------------
// copySelectedOptions(select_object,select_object[,autosort(true/false)])
//  This function copies options between select boxes instead of 
//  moving items. Duplicates in the target list are not allowed.
// -------------------------------------------------------------------
function copySelectedOptions(from,to) {
	var options = new Object();
	if (hasOptions(to)) {
		for (var i=0; i<to.options.length; i++) {
			options[to.options[i].value] = to.options[i].text;
			}
		}
	if (!hasOptions(from)) { return; }
	for (var i=0; i<from.options.length; i++) {
		var o = from.options[i];
		if (o.selected) {
			if (options[o.value] == null || options[o.value] == "undefined" || options[o.value]!=o.text) {
				if (!hasOptions(to)) { var index = 0; } else { var index=to.options.length; }
				to.options[index] = new Option( o.text, o.value, false, false);
				}
			}
		}
	if ((arguments.length<3) || (arguments[2]==true)) {
		sortSelect(to);
		}
	from.selectedIndex = -1;
	to.selectedIndex = -1;
	}

// -------------------------------------------------------------------
// moveAllOptions(select_object,select_object[,autosort(true/false)[,regex]])
//  Move all options from one select box to another.
// -------------------------------------------------------------------
function moveAllOptions(from,to) {
	selectAllOptions(from);
	if (arguments.length==2) {
		moveSelectedOptions(from,to);
		}
	else if (arguments.length==3) {
		moveSelectedOptions(from,to,arguments[2]);
		}
	else if (arguments.length==4) {
		moveSelectedOptions(from,to,arguments[2],arguments[3]);
		}
	}

// -------------------------------------------------------------------
// copyAllOptions(select_object,select_object[,autosort(true/false)])
//  Copy all options from one select box to another, instead of
//  removing items. Duplicates in the target list are not allowed.
// -------------------------------------------------------------------
function copyAllOptions(from,to) {
	selectAllOptions(from);
	if (arguments.length==2) {
		copySelectedOptions(from,to);
		}
	else if (arguments.length==3) {
		copySelectedOptions(from,to,arguments[2]);
		}
	}

// -------------------------------------------------------------------
// swapOptions(select_object,option1,option2)
//  Swap positions of two options in a select list
// -------------------------------------------------------------------
function swapOptions(obj,i,j) {
	var o = obj.options;
	var i_selected = o[i].selected;
	var j_selected = o[j].selected;
	var temp = new Option(o[i].text, o[i].value, o[i].defaultSelected, o[i].selected);
	var temp2= new Option(o[j].text, o[j].value, o[j].defaultSelected, o[j].selected);
	o[i] = temp2;
	o[j] = temp;
	o[i].selected = j_selected;
	o[j].selected = i_selected;
	}
	
// -------------------------------------------------------------------
// moveOptionUp(select_object)
//  Move selected option in a select list up one
// -------------------------------------------------------------------
function moveOptionUp(obj) {
	if (!hasOptions(obj)) { return; }
	for (i=0; i<obj.options.length; i++) {
		if (obj.options[i].selected) {
			if (i != 0 && !obj.options[i-1].selected) {
				swapOptions(obj,i,i-1);
				obj.options[i-1].selected = true;
				}
			}
		}
	}

// -------------------------------------------------------------------
// moveOptionDown(select_object)
//  Move selected option in a select list down one
// -------------------------------------------------------------------
function moveOptionDown(obj) {
	if (!hasOptions(obj)) { return; }
	for (i=obj.options.length-1; i>=0; i--) {
		if (obj.options[i].selected) {
			if (i != (obj.options.length-1) && ! obj.options[i+1].selected) {
				swapOptions(obj,i,i+1);
				obj.options[i+1].selected = true;
				}
			}
		}
	}

// -------------------------------------------------------------------
// removeSelectedOptions(select_object)
//  Remove all selected options from a list
//  (Thanks to Gene Ninestein)
// -------------------------------------------------------------------
function removeSelectedOptions(from) { 
	if (!hasOptions(from)) { return; }
	if (from.type=="select-one") {
		from.options[from.selectedIndex] = null;
		}
	else {
		for (var i=(from.options.length-1); i>=0; i--) { 
			var o=from.options[i]; 
			if (o.selected) { 
				from.options[i] = null; 
				} 
			}
		}
	from.selectedIndex = -1; 
	} 

// -------------------------------------------------------------------
// removeAllOptions(select_object)
//  Remove all options from a list
// -------------------------------------------------------------------
function removeAllOptions(from) { 
	if (!hasOptions(from)) { return; }
	for (var i=(from.options.length-1); i>=0; i--) { 
		from.options[i] = null; 
		} 
	from.selectedIndex = -1; 
	} 

// -------------------------------------------------------------------
// addOption(select_object,display_text,value,selected)
//  Add an option to a list
// -------------------------------------------------------------------
function addOption(obj,text,value,selected) {
	if (obj!=null && obj.options!=null) {
		obj.options[obj.options.length] = new Option(text, value, false, selected);
		}
	}



/************************** iFrame Form functions ****************************/
// -------------------------------------------------------------------
// resetIframeForm(select_object)
// reset the iframe form to defaults
// -------------------------------------------------------------------
function resetIframeForm(form)
{
    // disable all the folder showing elements
    form['folder'][0].disabled=true; 
    form['folder'][1].disabled=true;
    form['cat'].disabled=true;
    form['catSel[]'].disabled=true;  
    // reset the selected categories
    moveAllOptions(form['catSel[]'],form['cat'],true);
    document.getElementById('ifrHeleFolder').style.color="grey";
    document.getElementById('ifrDeelFolder').style.color="grey"; 
    // disable shops
    for(i=1; i<=5; i++)
    {
        form['shop'+i].disabled=true;
        document.getElementById('ifrWinkel'+i).style.color="grey";
    }
}


// -------------------------------------------------------------------
// ifrFolderCheckbox(form)
// perform the needed actions after clicking the "show folder" checkbox
// -------------------------------------------------------------------
function ifrFolderCheckbox(form)
{
    if(form['folder'][0].disabled==true && form['folderShow'].checked==true)                                          
    {
        form['folder'][0].disabled=false; // enable showing whole folder radio
        form['folder'][1].disabled=false; // enable showing loose cats radio
        if(form['folder'][1].checked==false)
        {
            form['folder'][0].checked=true; // check the whole folder radio
        }
        else
        {
            form['cat'].disabled=false; // open the categories selects
            form['catSel[]'].disabled=false;
        }
        // indicate the option "active" by changing color
        document.getElementById('ifrHeleFolder').style.color="black"; 
        document.getElementById('ifrDeelFolder').style.color="black"; 
    } 
    else if(form['folderShow'].checked==false)
    {
        form['folder'][0].disabled=true; // disable all the folder showing stuff
        form['folder'][1].disabled=true;
        form['cat'].disabled=true;
        form['catSel[]'].disabled=true;
        // indicate the option "inactive" by changing color
        document.getElementById('ifrHeleFolder').style.color="grey"; 
        document.getElementById('ifrDeelFolder').style.color="grey"; 
    }
}

// -------------------------------------------------------------------
// ifrFolderShowAllRadio(form)
// enable/disable needed functions onclick of "show all" option of the radio
// -------------------------------------------------------------------
function ifrFolderShowAllRadio(form)
{
    if(form['cat'].disabled==false) 
    {
        form['cat'].disabled=true;
        form['catSel[]'].disabled=true;
    }
}

// -------------------------------------------------------------------
// ifrFolderShowSomeRadio(form)
// enable/disable needed functions onclick of "show some" option of the radio
// -------------------------------------------------------------------

function ifrFolderShowSomeRadio(form)
{
    if(form['cat'].disabled==true) 
    {
        form['cat'].disabled=false;
        form['catSel[]'].disabled=false;
    }
}


// -------------------------------------------------------------------
// ifrShopsCheckbox(form)
// enable/disable needed functions onclick of "show shops" checkbox
// -------------------------------------------------------------------

function ifrShopsCheckbox(form)
{
    for(i=1; i<=5; i++)
    {
        if(form['shop'+i].disabled==true) 
        {
            form['shop'+i].disabled=false;
            // indicate the option "active" by changing color
            document.getElementById('ifrWinkel'+i).style.color="black";
        } 
        else 
        {
            form['shop'+i].disabled=true;
            document.getElementById('ifrWinkel'+i).style.color="grey";
        }
    }
}

/************************ end iFrame Form functions **************************/

//// RSS form functions:
// this one creates the shopsRSSLink on the fly
function rssTest(url)
{
    var shopLink = url;
    var comma = "";
	//alert(document.getElementById('rssWinkel1').color);
	
    // create the link by taking values of all shop input fields
    for(var i = 1; i <= 5; i++)
    {
        if(document.getElementById('shop'+ i).value != "")
        {
            shopLink = shopLink + comma + document.getElementById('shop'+ i).value;
            comma = ",";
			document.getElementById('rssWinkel'+ i).style.color='black';
        }
		else
		{
			document.getElementById('rssWinkel'+ i).style.color='#bbbbbb';
		}
    }
    document.getElementById('shopsRSSLink').innerHTML = shopLink;
    document.getElementById('shopsRSSLink').href = shopLink;

    document.getElementById('googleRSSLink').href="http://fusion.google.com/add?feedurl=" + shopLink;
    document.getElementById('yahooRSSLink').href="http://add.my.yahoo.com/rss?url=" + shopLink;
    document.getElementById('newsgatorRSSLink').href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=" + shopLink;
    document.getElementById('msnRSSLink').href="http://my.msn.com/addtomymsn.armx?id=rss&amp;ut="+ shopLink +"&amp;tt=CENTRALDIRECTORY&amp;ru=http://    document.getElementById('shopsRSSLink').hrefrss.msn.com"
    document.getElementById('bloglinesRSSLink').href="http://www.bloglines.com/sub/" + shopLink;

    
}













