function propergateformfeild(idname,valuetext){
values = jQuery(idname).attr('value');
if(values != valuetext && values == undefined){
jQuery(idname).attr('value',valuetext);
jQuery(idname).click(function(){
jQuery(idname).attr('value','');});}}


function addwidth(id,widthopt){

mainwidth = 260;
new_html = jQuery(id).html();


jQuery(id+' option').each(function() {

//currentname = jQuery(this).html();
//th = jQuery(this).html();


//jQuery(this).attr('width',mainwidth);
//jQuery(this).attr('style','width:'+mainwidth+'px; display:block; white-space:pre-line;');


});


//jQuery(id).html(''+new_html+'');

}

function IeHandleSelect(id){
//ie6 ie7  handling

widthopt = 0;

jQuery(id).focus(function() {

widthopt = jQuery(this).find('option').width();


});


jQuery(id).blur(function() {

widthopt = jQuery(this).find('option').width();

});

jQuery(id).click(function() {

widthopt = jQuery(this).find('option').width();

});

addwidth(id,widthopt);

}


jQuery(document).ready(function(){


IeHandleSelect('#areas_p select');

propergateformfeild('#search_input','Search');


jQuery('#search_events select').change(function(){


linkloc = jQuery(this).attr('value');

window.location = linkloc;

});
jQuery('#areas_p select').change(function(){


linkloc = jQuery(this).attr('value');

window.location = linkloc;

});


});
