function select_value(select,value){
	if(select) {
		for(i=0;i < select.options.length;i++){
			if(select.options[i].value==value){
				select.options[i].selected=true;
				return true;
			}
		}
	}

	return false;
}

function select_radio(radio,value){
	if (radio.length) {
	   for(i=0;i<radio.length;i++){
	      if(radio[i].value==value){
	         radio[i].checked=true;
	         return;
	      }
	   }
	}
	else {
		radio.checked=true;
	}
}

/*	used to open modal popups using class popup on a links	*/
function popup(f,nom, w, h) {
   var top=0;
   var left=0;
   if (self.screen)
      left=(screen.width-(w+((screen.width*1)/100)));
   myWin = window.open(f, nom, 'resizable,screenX=0,screenY=0,scrollbars=yes,menubar=yes,top='+top+',left='+left +',width=' + w + ',height=' + h );
   myWin.focus();
}





//
//	SmartAdServer
//

sas_tmstp=Math.round(Math.random()*10000000000);
sas_masterflag=1;


function SmartAdServer(sas_pageid,sas_formatid,sas_master,sas_target) {
	if ((sas_master!='M')&&(sas_master!='S')) {sas_master='S'};
	document.write('<SCR'+'IPT SRC="' + document.location.protocol +'//www.smartadserver.com/call/pubj/' + sas_pageid + '/' + sas_formatid + '/'+sas_master + '/' + sas_tmstp + '/' + escape(sas_target) + '?"></SCR'+'IPT>');
}

function SmartAdServer_iframe(sas_pageid,sas_formatid,sas_target,sas_w,sas_h) { 
	if (sas_masterflag==1) {sas_masterflag=0;sas_master='M';} else {sas_master='S';}; 
	document.write('<IFRAME SRC="http://www.smartadserver.com/call/pubif/' + sas_pageid + '/' + sas_formatid + '/'+sas_master + '/' + sas_tmstp + '/' + escape(sas_target) + '?" width=' + sas_w + ' height=' + sas_h + ' marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no>'); 
	document.write('<scr'+'ipt type="text/javascr'+'ipt">\ndocument.write\(\'<SCR\'+\'IPT SRC="http://www.smartadserver.com/call/pubj/' + sas_pageid + '/' + sas_formatid + '/'+sas_master + '/' + sas_tmstp + '/' + escape(sas_target) + '?"></SCR\'+\'IPT>\'\)\;\n</scr'+'ipt>'); 
	document.write('</IFRAME>'); 
} 

function SmartAdServer_iframe_secure(sas_pageid,sas_formatid,sas_target,sas_w,sas_h) { 
	if (sas_masterflag==1) {sas_masterflag=0;sas_master='M';} else {sas_master='S';}; 
	document.write('<IFRAME SRC="https://www.smartadserver.com/call/pubif/' + sas_pageid + '/' + sas_formatid + '/'+sas_master + '/' + sas_tmstp + '/' + escape(sas_target) + '?" width=' + sas_w + ' height=' + sas_h + ' marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no>'); 
	document.write('<scr'+'ipt type="text/javascr'+'ipt">\ndocument.write\(\'<SCR\'+\'IPT SRC="http://www.smartadserver.com/call/pubj/' + sas_pageid + '/' + sas_formatid + '/'+sas_master + '/' + sas_tmstp + '/' + escape(sas_target) + '?"></SCR\'+\'IPT>\'\)\;\n</scr'+'ipt>'); 
	document.write('</IFRAME>'); 
} 
