﻿
var checkboxHeight = "25";
var radioHeight = "25";
var selectWidth = "155";

/* No need to change anything after this */

document.write('<style type="text/css">input.stylednew { display: none; } select.stylednew {font-size:0.99em; position: relative; color:#000;width: ' + selectWidth + 'px; opacity: 0; filter: alpha(opacity=0);} select.stylednew {font-family:Lucida Sans Unicode;font-size:0.99em; position: relative; color:#000;width: ' + selectWidth + 'px; opacity: 0; filter: alpha(opacity=0); z-index: 5; } </style>');

var Custom = {
	init: function() {
		var inputs = document.getElementsByTagName("input"), span = Array(), textnode, option, active;
		for(a = 0; a < inputs.length; a++) {
			if((inputs[a].type == "checkbox" || inputs[a].type == "radio") && inputs[a].className == "stylednew") {
				span[a] = document.createElement("span");
				span[a].className = inputs[a].type;

				
				inputs[a].parentNode.insertBefore(span[a], inputs[a]);
				
			}
		}
		inputs = document.getElementsByTagName("select");
		for(a = 0; a < inputs.length; a++) {
			if(inputs[a].className == "stylednew") {
				option = inputs[a].getElementsByTagName("option");
				active = option[0].childNodes[0].nodeValue;
				textnode = document.createTextNode(active);
				for(b = 0; b < option.length; b++) {
					if(option[b].selected == true) {
						textnode = document.createTextNode(option[b].childNodes[0].nodeValue);
					}
				}
				span[a] = document.createElement("span");
				span[a].className = "quaterselect";
				span[a].id = "quaterselect" + inputs[a].name;
				span[a].appendChild(textnode);
				inputs[a].parentNode.insertBefore(span[a], inputs[a]);
				inputs[a].onchange = Custom.choose;
			}
		}
		
	},
	
	choose: function() {
		option = this.getElementsByTagName("option");
		for(e = 0; e < option.length; e++) {
			if(option[e].selected == true) {
				document.getElementById("quaterselect" + this.name).childNodes[0].nodeValue = option[e].childNodes[0].nodeValue;
				
			}
		}
				
		loadmediaarchives('2');
	}
}
window.onload = Custom.init;
   
