﻿<script language="javascript" type="text/javascript">
<!--
	function doSubmit(url){
		document.forms[0].action=url;
		document.forms[0].submit();
	}
		function doSubmit(url,value){
		document.forms[0].action=url+'?value='+value;
		document.forms[0].submit();
	}
    function openWindow(page,name,height,width,toolbar,resize,location,dependent,menubar,scrollbars){
		var newWindow = window.open(page,name,'height='+height,'width='+width,'toolbar='+toolbar,'resizable='+resize,'location='+location,'dependent='+dependent,'menubar='+menubar,'scrollbars='+scrollbars);
		return true;
    }
	//---IE = JScript vs ECMA browsers
    function setQuerystring(values,page,name,height,width,toolbar,resize,location,dependent,menubar,scrollbars){
		var qs;
		var arr = values.split(',');
		var entries = arr.length;
		switch (entries) {
			case 1:
				qs+='?mdc01='+entries[0];
				break;
			case 2:
				qa+='?mdc01='+entries[0]+'&mdc02='+entries[1];
			case 3:
			qa+='?mdc01='+entries[0]+'&mdc02='+entries[1]+'&mdc02='+entries[2];
			case 4:
			qa+='?mdc01='+entries[0]+'&mdc02='+entries[1]+'&mdc02='+entries[2]+'&mdc02='+entries[3];
		}
		var url = page+qa;
		var newWindow = window.open(url,name,'height='+height,'width='+width,'toolbar='+toolbar,'resizable='+resize,'location='+location,'dependent='+dependent,'menubar='+menubar,'scrollbars='+scrollbars);
		return true;
    }
//*************** PRINTING ******************************************
	function printAcceptedJobs(strTable)
	{
		if(strTable != ''){
		var printWindow = window.open('acceptedJobs','jobList','');
		window.print();
		return true;
		}else{
		//alert('it\'s working');
		return true;
		}
	}
	function print640x740Dated(strHTML){
		var newWin = window.open('','printDoc','toolbar=no,menubar=yes,status=no,directories=no,titlebar=no,width=640,height=740,resizable=yes');	
		var oDate = new Date();
		var strDate = oDate.toUTCString();
		newWin.document.writeln('<div style=\"font-size:small;font-weight:bold;color:blue;\">Cocamar - Accepted Job List: '+strDate+'</div>');
		newWin.document.write(strHTML);
		newWin.document.close();
		newWin.print();
	}
	function print640x740wQuerystring(values){
		var qs;
		var arr = values.split(',');
		var entries = arr.length;
		switch (entries) {
			case 1:
				qs+='?mdc01='+entries[0];
				break;
			case 2:
				qa+='?mdc01='+entries[0]+'&mdc02='+entries[1];
			case 3:
			qa+='?mdc01='+entries[0]+'&mdc02='+entries[1]+'&mdc02='+entries[2];
			case 4:
			qa+='?mdc01='+entries[0]+'&mdc02='+entries[1]+'&mdc02='+entries[2]+'&mdc02='+entries[3];
		}
		var url = page+qa;	
		var newWindow = window.open(url,name,'height='+height,'width='+width,'toolbar='+toolbar,'resizable='+resize,'location='+location,'dependent='+dependent,'menubar='+menubar,'scrollbars='+scrollbars);
		newWindow.print();
	}
	
	function cdata(input) {
		alert(typeof(input));
		alert(input.name);
		var agent = '';
		var ip = '';
		var timezone = '';
		return true;	
	}
// -->
</script>
