function openSerialPopUp(url) {
	window.open(url, 'findYourSerNum', 'width=600,height=800,location=no,menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=no');
}
if($("#windowLabel").size()>0) {
	var regex = '[?&]_windowLabel=([^&#]*)';
	var results = (new RegExp(regex)).exec(decodeURIComponent(window.location.href));
	if(results) {
		$("#windowLabel").attr({value:results[1]});
	}
}

addEvent(window, 'load', function() { 
	if(typeof(useHbx)!=='undefined' && useHbx) {
		if($("form.basicForm a").size()>0) {
			$("form.basicForm a").one("click", function(event){
				_hbSet("c3","warranty repair button");
				_hbSend();
			});
		}
		
		if($("a.hbx_warranty_check").size()>0) {
			var hbxData = "Warranty Checker";
			var regex = '[?&]c=([^&#]*)';
			var results = (new RegExp(regex)).exec(decodeURIComponent(window.location.href));
			if((result && '1'==result[1])||'1'==$("input[name='c']").val()) {
				hbxData = "warranty checker repair";
			}
			$("a.hbx_warranty_check").one("click",function(event){
				_hbSet("c3",hbxData);
				_hbSend();
			});
		}
	}
	
	if($("#validationError").size()>0) {
		if(typeof(showAlert)!=='undefined'&& showAlert) 
		{
			alert("validation error");
		}
		var regexp = '[?&]c=([^&#]*)';
		var result = (new RegExp(regex)).exec(decodeURIComponent(window.location.href));
		if((result && '1'==result[1])||'1'==$("input[name='c']").val()) {
			_hbSet("c3","warranty checker repair validation error");
			_hbSend();
		}
		else{
			_hbSet("c3","warranty checker validation error");
			_hbSend();
		}
	}

	if($("#warrantyCheckPleaseTryAgain").size()>0) {
		_hbSet("c3","warranty checker pleasetryagainlater");
		_hbSend();
	}

	if(typeof(warrantyCheckResultStr)!=='undefined'&& warrantyCheckResultStr.length>5) {
	
		if(typeof(showAlert)!=='undefined'&& showAlert) 
		{
			alert("submit success");
			alert("result : " + warrantyCheckResultStr);
		}
		
		if('true'==$("input[name='notInWarranty']").val()) {
			_hbSet("c3","warranty checker repair success");
			_hbSend();
			
			_hbSet("c3","warranty checker repair result " + warrantyCheckResultStr.toLowerCase());
			_hbSend();
		}
		else{
			_hbSet("c3","warranty checker success");
			_hbSend();
			
			_hbSet("c3","warranty check result " + warrantyCheckResultStr.toLowerCase());
			_hbSend();
		}
	}
});
