$(function(){
	var row=getParameter("row");
	var checkArr=[
		"#company"+row,
		"#manager"+row,
		"#phone"+row,
		"#email"+row
	]
	checkArr.forEach((check)=>{
		var input=check.substr(0,check.length-1);
		$(check,opener.document).is(":checked")?$(input).prop('checked',true):$(input).prop('checked',false);
	})
	
	
	
	
	function getParameter(name) {
	    name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
	    var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
	        results = regex.exec(location.search);
	    return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
	}
	
	
	
})