function getparam(lookfor)
{
var st  = new String(document.location);
var start  = st.indexOf (lookfor);
if (start != -1) {
st = st.substring (start);
start = st.indexOf ('=');
st = st.substring (start+1);
eind = st.indexOf ('&');
if (eind == -1) {
eind = st.length;
}
st = st.replace (/\+/g, ' ');
var st = unescape (st.substring (0, eind));
} else {
st = ""
}
return st;
}

function submit_search() {
var stype
var mmcat
for (i = 0; i < mmsearchform34_11.mmstype34_11.length; i++) {
if (mmsearchform34_11.mmstype34_11[i].checked) {
stype = mmsearchform34_11.mmstype34_11[i].value;
}
}
if (typeof(stype)=='undefined') stype=mmsearchform34_11.mmstype34_11.value;
for (i = 0; i < mmsearchform34_11.mmcat34_11.length; i++) {
if (mmsearchform34_11.mmcat34_11[i].selected) {
mmcat = mmsearchform34_11.mmcat34_11[i].value;
}
}
if (typeof(mmcat)=='undefined') mmcat=mmsearchform34_11.mmcat34_11.value;
mmsearchresults(mmsearchform34_11.mmsearch34_11.value, stype, mmcat, mmsearchform34_11.mmcountry34_11.value);
}

function countrychange()
{
document.mmsearchform34_11.mmcountry34_11.value = document.mmsearchform34_11.mmcat34_11[document.mmsearchform34_11.mmcat34_11.selectedIndex].id;
}

if (typeof(document.mmsearchform34_11.mmcat34_11.options) != 'undefined') {
for (i = 0; i < document.mmsearchform34_11.mmcat34_11.options.length; i++) {
if (document.mmsearchform34_11.mmcat34_11.options[i].value == getparam("mmcat34_11")) {
if ((getparam("mmcat34_11") == 0) || (document.mmsearchform34_11.mmcat34_11.options[i].id == getparam("mmcountry34_11"))) {
document.mmsearchform34_11.mmcat34_11.options[i].selected = true;
}
}
}
}

if (typeof(document.mmsearchform34_11.mmstype34_11[1]) != 'undefined') {
if  (getparam("mmstype34_11") == 'and') {
document.mmsearchform34_11.mmstype34_11[0].checked = true
}
}
if (typeof(document.mmsearchform34_11.mmcat34_11.options) != 'undefined') {
document.mmsearchform34_11.mmcountry34_11.value = document.mmsearchform34_11.mmcat34_11[document.mmsearchform34_11.mmcat34_11.selectedIndex].id;
}
document.mmsearchform34_11.mmsearch34_11.value = unescape(getparam("mmsearch34_11"))
